reorder locals