Tree generation works