Added a comparator class for multiple comparators