generize tree