Working with tree