reverse sense of sort, remove negation loops