add some tree operations