add some algorithms about tree