logic reversal