Comparator can directly be used instead of FunctionSort