update comparator