generate-tree