add binaryTree template and testing code