implemented graph iterators