adding the iterator implementation