added iterative version to compare with DivCon.
Merge remote-tracking branch 'origin'