changed all locations to iterators