added a bit more functionality to the tree