added more parameters to TreeNode constructor