quite a working treebuilder now