added comparator class