use the tree class directly