changed implementation of iterator to work with multiple-mutable iterators (close #11)