Reorder patterns