modified instanceiterator