- added unique iterator and fixed some other problems