slope comparator class created