added iterations to main code
sync fix