         }
         
     }
+    
+    private func containsDelimiter(input: String) -> Bool {
+        return input.containsString(",")
+    }
+    
+    private func isFirstCharADelimiter(input: String) -> Bool {
+        return input[input.startIndex] == ","
+    }
+    
 }
 
 extension String {

    subscript(integerRange: Range<Int>) -> String {
        let start = self.startIndex.advancedBy(integerRange.startIndex)
        let end = self.startIndex.advancedBy(min(self.characters.count, integerRange.endIndex))
        
        let range = start..<end
        return self[range]
    }
}

extension Int {
    func countDigits() -> Int {
        var n = self
        var sum = 0

    func extract(input: String) -> [Int] {
        if input.isEmpty {
            return []
        } else if isFirstCharADelimiter(input) {
            return extract(input[1..<input.countChars()])
        } else if containsDelimiter(input) {
            let currentNumber = extractCurrentNumber(input)
            let restOfNumbers = extract(input[currentNumber.countDigits()...input.countChars()])
            return [currentNumber] + restOfNumbers
        } else {
            return [extractCurrentNumber(input)]
