extracted conversion of comparator