Adding tree structure