add new data field to TreeNode
add solution to Q4.6