Updated comparator