update methods for BinaryTree.java