small changes to the iterator