setting up TreeNode class