updates for methods in BinaryTree.java