change order of terms