Changes for tree generation