002 - Algorithm corrected

The iterative algorithm has been corrected but it still doesn't give
acceptable results.