iteration on least squares