implemented a treeparser