trying to put the tree insde a recursion