simplify comparator