fix tset iterators. Add tests for tset