tree has some problems with iterator