added negated condition to and and or