refactoring comparator, delete Helper