sortUsingComparator with a block