more misbehaving comparators. Wrapped the sorting in a method to reuse
it