make iterators "dumb".  Add IsValid() function to iterator.