the tree algorithm