Adding the dependencies in the tree