             }
             return y
         }
-        guard let patchFilePathData = patchFilePath.dataUsingEncoding(NSUTF8StringEncoding) else {
-            log("unable to convert patch file path into data")
-            throw BRBSPatchError.Unknown
-        }
-        let patchFilePathBytes = UnsafePointer<Int8>(patchFilePathData.bytes)
-        let r = UnsafePointer<Int8>("r".dataUsingEncoding(NSASCIIStringEncoding)!.bytes)
+        let patchFilePathBytes = UnsafePointer<Int8>((patchFilePath as NSString).UTF8String)
+        let r = UnsafePointer<Int8>(("r" as NSString).UTF8String)
         
         // open patch file
         guard let f = NSFileHandle(forReadingAtPath: patchFilePath) else {

                                        NSLocalizedString("error extracting bundle: " + "\(e)", comment: ""))
                                }
                            } else { // don't have the most recent version, download diff
                                let req = NSURLRequest(URL:
                                    self.url("/assets/bundles/\(bundleName)/diff/\(curBundleSha)"))
                                self.dataTaskWithRequest(req, handler: { (diffDat, diffResp, diffErr) -> Void in

            }
            
            // add old data to diff string
            if crtl[0] > 0 {
                for i in 0...(Int(crtl[0]) - 1) {
                    if (oldPos + i >= 0) && (oldPos + i < oldSize) {
                        let np = Int(newPos) + i, op = Int(oldPos) + i
                        new[np] = new[np] &+ old[op]
                    }
                }
            }
            
