changed direction of greaterthan/lessthan.