func reorder