added negation handling