This code is my version of BinaryTree