         // Generate final sorted array
         var result = [Rank]()
         var histogram = [Int]()
-        for key in sortedWithinRanks.keys.sorted(isOrderedBefore: >) {
-            for rank in sortedWithinRanks[key]!.sorted(isOrderedBefore: >) {
+        for key in sortedWithinRanks.keys.sorted(by: >) {
+            for rank in sortedWithinRanks[key]!.sorted(by: >) {
                 histogram.append(key)
                 let currentRanks = [Rank](repeating: rank, count: key)
                 result += currentRanks

        guard ranks.keys.count == 5 else {
            return false
        }
        let sortedRanks = ranks.keys.map({$0.rawValue}).sorted(isOrderedBefore: >)
        return sortedRanks[0] - sortedRanks[4] == 4
    }


    return Card(rank: rank, suit: suit)
}

let fileURL = Bundle.main.url(forResource: "p54", withExtension: "txt")
let content = try String(contentsOf: fileURL!, encoding: String.Encoding.utf8)
let array = content.components(separatedBy: "\n")
var count = 0
