a simple binary tree construction and traversal