doIteration method added