add constructor to TreeNode