generate the list to reorder