changing IIterable to IIterator