changed iter next method