implement k-multiset iterator