optomized boolean logic and double negatives