removing unnecessary set method in TreeNode