generatorTree work