prototype of trees and iterators