add tree generation