basic tree structure implemented