  We develop an optimization approach to model the magnetic field configuration
of magnetic clouds, based on a linear-force free formulation in three
dimensions. Such a solution, dubbed the Freidberg solution, is kin to the
axi-symmetric Lundquist solution, but with more general "helical symmetry". The
merit of our approach is demonstrated via its application to two case studies
of in-situ measured magnetic clouds. Both yield results of reduced
$\chi^2\approx 1$. Case 1 shows a winding flux rope configuration with one
major polarity. Case 2 exhibits a double-helix configuration with two flux
bundles winding around each other and rooted on regions of mixed polarities.
This study demonstrates the three-dimensional complexity of the magnetic cloud
structures.
