a common TreeNode class