A combination of the magnetotelluric phase tensor and the quadratic algorithm provides a fast and simple solution to the problem of a 2D impedance tensor distorted by 3D electrogalvanic effects. The strike direction is provided by the phase tensor, which is known to provide unstable estimates for noisy data. We obtain stable directions in three steps. First, we use bootstrapping to find the most stable estimate among the different periods. Second, this value is used as the seed to select the neighbor strikes assuming continuity over periods. This second step is repeated several times to compute variances. The third step, which we call prerotating, consists of rotating the original impedance tensor to a most favorable angle for optimal stability and then rotating it back for compensation. The procedure is developed as a progressing algorithm through its application to the gradually more difficult data sets COPROD2S1, COPROD2, far-hi, and BC87, all available for testing new ideas. Alternately, using the Groom-Bailey terminology, the quadratic algorithm provides the amplitudes and phases independently of the strike direction and twist. The amplitudes and phases still need to be tuned up by the correct shear. The correct shear is obtained by contrasting the phases from the phase tensor and from the quadratic equation until they match for all available periods. The results are the undistorted impedances. Uncertainties are computed using formulas derived for the quadratic equation. We use the same data sets as for the strike to illustrate the recovery of impedances and their uncertainties.