removed inorder and postorder traversal methods to be added later