better (?) xor and ifThenElse (no extra variables)