setting the TreeIterator