More functions to work with tree