removed unnecessary TreeNode class