cleaning the tree