Nitpick: I don't think "inverting" is the correct; "inverting" implies a reversal of order. I think "mixing" better describes the problem. Would you agree?