added iteratewhile