added testing with the tree
somewhat working version of the TreeBuilder