updating comparator