         return (rhPerson.compositeName == nil || rhPhoneNumbers == nil)
     }
     
-    private func writeRecordWithPerson(rhPerson: RHPerson) {
+    private func writeRecord(#realm: RLMRealm, rhPerson: RHPerson) {
         if shouldSkip(rhPerson) {
             return;
         }

        return RHAddressBook.authorizationStatus() == RHAuthorizationStatus.Authorized
    }
    
    func copyRecords( success:(()->())?, failure:((message: String)->())? ) {
        if hasPermission() {
            let people = self.ab.peopleOrderedByUsersPreference as! [RHPerson]
            for rhPerson in people {
                self.writeRecordWithPerson(rhPerson)
            }
            success?()
        } else {
            failure?(message: "no permission")
        }

            phoneNumbers: rlmPhoneNumbers
        )
        
        // TODO: Enforce that this happens in the expected thread and transaction
        OSTPerson.createOrUpdateInRealm(realm, withObject: ostPerson)
    }
    
    func requestAuthorization(completion:(isGranted: Bool, permissionError: NSError?)->()) {
