error in negation check corrected