added iteratoin counter