added traversal methods for the tree