add tree structure