reorder sections properly