Create populate_next_tree