comments and simplify comparator