     }
 }
 
-func parseExistingANSI(string:String) -> [ANSIGroup] {
+func parseExistingANSI(string: String) -> [ANSIGroup] {
     var results:[ANSIGroup] = []
     
     let matches = matchesForRegexInText("\\u001B\\[([^m]*)m(.+?)\\u001B\\[0m", text: string, global: true)

    return nil
}

func addCodeToCodesArray (codes:Array<Int>, code:Int) -> Array<Int> {
    var result:Array<Int> = codes
    
    if colorCodes.values.contains(code) {

    let code = getCode(command)
    let existingANSI = parseExistingANSI(string)
    
    if code == nil {
        return string
    } else if existingANSI.count > 0 {
        return existingANSI.map {
            return ANSIGroup(codes: addCodeToCodesArray($0.codes, code: code!), string: $0.string).toString()
            }.joinWithSeparator("")
