implemented tree-node, including tests