reorder conditions