corrected error with v2 (iterations)