added a few more functions, merged the tree with the tree params