Changed direction of comparator