Updated iterator methods to match implementation given to us