add check for real number of iterations