update TreeNode and unit test