         req.entity = entity
 
         // perform initial model fetch
-        var e: NSError?
         do {
             let items = try managedObjectContext.executeFetchRequest(req)
             for object in items {

        // end of headers
        
        
        let rowUsername: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowUsername.key = "Username"
        rowUsername.value = ""
        rowUsername.section = "1"
        rowUsername.types = NSSet(array: Array<Type>([typeGenericAcc, typeDatabase, typeFtpServer, typeServer, typeRegularMail, typeGmail, typeHotmail, typeYahooMail, typeRegular, typeFacebook, typeGoogle, typeTwitter, typeInstagram, typeFlickr, typeYoutube, typeLinkedin, typeYahoo, typePaypal, typeAmazon, typeEbay, typeWordpress])
)
        
        let rowPassword: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowPassword.key = "Password"
        rowPassword.value = ""
        rowPassword.section = "1"
        rowPassword.types = NSSet(array: Array<Type>([typeGenericAcc, typeInstnMssngr, typeDatabase, typeFtpServer, typeWirelessRtr, typeServer, typeRegularMail, typeGmail, typeHotmail, typeYahooMail, typeMembership, typeRegular, typeFacebook, typeGoogle, typeTwitter, typeInstagram, typeFlickr, typeYoutube, typeLinkedin, typeYahoo, typePaypal, typeAmazon, typeEbay, typeWordpress]))

        let rowNote: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowNote.key = "note"
        rowNote.value = "No Note"
        rowNote.section = "2"
        rowNote.types = NSSet(array: Array<Type>([typeGenericAcc, typeInstnMssngr, typeDatabase, typeFtpServer, typeSoftwrLcnc, typeWirelessRtr, typeServer, typeRegularMail, typeGmail, typeHotmail, typeYahooMail, typeBankAccount, typeID, typePassport, typeRegular, typeFacebook, typeGoogle, typeTwitter, typeInstagram, typeFlickr, typeYoutube, typeLinkedin, typeYahoo, typePaypal, typeAmazon, typeEbay, typeWordpress, typeNote]))
        
        let rowID: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowID.key = "ID"
        rowID.value = ""
        rowID.section = "1"
        rowID.types = NSSet(array: [typeInstnMssngr])
        
        let rowKey: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowKey.key = "Key"
        rowKey.value = ""
        rowKey.section = "1"
        rowKey.types = NSSet(array: [typeSoftwrLcnc])
        
        let rowType: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowType.key = "Type"
        rowType.value = ""
        rowType.section = "1"
        rowType.types = NSSet(array: Array<Type>([typeDatabase, typeBankAccount, typeCreditCard]))
        
        let rowServer: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowServer.key = "Server"
        rowServer.value = ""
        rowServer.section = "1"
        rowServer.types = NSSet(array: Array<Type>([typeDatabase, typeFtpServer, typeRegularMail, typeGmail, typeHotmail, typeYahooMail]))

        let rowPort: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowPort.key = "Port"
        rowPort.value = ""
        rowPort.section = "1"
        rowPort.types = NSSet(array: [typeDatabase])

        let rowDatabase: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowDatabase.key = "Database"
        rowDatabase.value = ""
        rowDatabase.section = "1"
        rowDatabase.types = NSSet(array: [typeDatabase])
        
        let rowSID: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowSID.key = "SID"
        rowSID.value = ""
        rowSID.section = "1"
        rowSID.types = NSSet(array: [typeDatabase])
        
        let rowAlias: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowAlias.key = "Alias"
        rowAlias.value = ""
        rowAlias.section = "1"
        rowAlias.types = NSSet(array: [typeDatabase])
        
        let rowOptions: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowOptions.key = "Options"
        rowOptions.value = ""
        rowOptions.section = "1"
        rowOptions.types = NSSet(array: [typeDatabase])
        
        let rowPath: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowPath.key = "Path"
        rowPath.value = ""
        rowPath.section = "1"
        rowPath.types = NSSet(array: [typeFtpServer])
        
        let rowProvider: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowProvider.key = "Provider"
        rowProvider.value = ""
        rowProvider.section = "1"
        rowProvider.types = NSSet(array: [typeFtpServer])
        
        let rowWebsite: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowWebsite.key = "Website"
        rowWebsite.value = ""
        rowWebsite.section = "1"
        rowWebsite.types = NSSet(array: Array<Type>([typeFtpServer, typeMembership]))

        let rowPhone: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowPhone.key = "Phone"
        rowPhone.value = ""
        rowPhone.section = "1"
        rowPhone.types = NSSet(array: [typeFtpServer])
        
        let rowStation: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowStation.key = "Station"
        rowStation.value = ""
        rowStation.section = "1"
        rowStation.types = NSSet(array: [typeWirelessRtr])
        
        let rowIpAddress: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowIpAddress.key = "Ip Address"
        rowIpAddress.value = ""
        rowIpAddress.section = "1"
        rowIpAddress.types = NSSet(array: [typeWirelessRtr])
        
        let rowAirportID: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowAirportID.key = "Airport ID"
        rowAirportID.value = ""
        rowAirportID.section = "1"
        rowAirportID.types = NSSet(array: [typeWirelessRtr])
        
        let rowNetwork: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowNetwork.key = "Network"
        rowNetwork.value = ""
        rowNetwork.section = "1"
        rowNetwork.types = NSSet(array: [typeWirelessRtr])
        
        let rowSecurity: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowSecurity.key = "Security"
        rowSecurity.value = ""
        rowSecurity.section = "1"
        rowSecurity.types = NSSet(array: [typeWirelessRtr])
        
        let rowNetwrkPass: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowNetwrkPass.key = "Network Passwd."
        rowNetwrkPass.value = ""
        rowNetwrkPass.section = "1"
        rowNetwrkPass.types = NSSet(array: [typeWirelessRtr])
        
        let rowStoragePass: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowStoragePass.key = "Storate Passwd."
        rowStoragePass.value = ""
        rowStoragePass.section = "1"
        rowStoragePass.types = NSSet(array: [typeWirelessRtr])
        
        let rowUrl: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowUrl.key = "Url"
        rowUrl.value = ""
        rowUrl.section = "1"
        rowUrl.types = NSSet(array: Array<Type>([typeServer, typeRegular, typeFacebook, typeGoogle, typeTwitter, typeInstagram, typeFlickr, typeYoutube, typeLinkedin, typeYahoo, typePaypal, typeAmazon, typeEbay, typeWordpress]))
        
        let rowName: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowName.key = "Name"
        rowName.value = ""
        rowName.section = "1"
        rowName.types = NSSet(array: Array<Type>([typeServer, typeID, typeMembership, typePassport]))
        
        let rowAdmPUrl: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowAdmPUrl.key = "Admin Panel URL"
        rowAdmPUrl.value = ""
        rowAdmPUrl.section = "1"
        rowAdmPUrl.types = NSSet(array: [typeServer])
        
        let rowAdmPUsername: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowAdmPUsername.key = "Adm.P.Username"
        rowAdmPUsername.value = ""
        rowAdmPUsername.section = "1"
        rowAdmPUsername.types = NSSet(array: [typeServer])
        
        let rowAdmPPassword: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowAdmPPassword.key = "Adm.P.Password"
        rowAdmPPassword.value = ""
        rowAdmPPassword.section = "1"
        rowAdmPPassword.types = NSSet(array: [typeServer])
        
        let rowSupportURL: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowSupportURL.key = "Support URL"
        rowSupportURL.value = ""
        rowSupportURL.section = "1"
        rowSupportURL.types = NSSet(array: [typeServer])
        
        let rowSupport: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowSupport.key = "Support#"
        rowSupport.value = ""
        rowSupport.section = "1"
        rowSupport.types = NSSet(array: [typeServer])
        
        let rowServerType: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowServerType.key = "Server Type"
        rowServerType.value = ""
        rowServerType.section = "1"
        rowServerType.types = NSSet(array: Array<Type>([typeRegularMail, typeGmail, typeHotmail, typeYahooMail]))

        let rowSmtpServer: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowSmtpServer.key = "SMTP Server"
        rowSmtpServer.value = ""
        rowSmtpServer.section = "1"
        rowSmtpServer.types = NSSet(array: Array<Type>([typeRegularMail, typeGmail, typeHotmail, typeYahooMail]))

        let rowWebmail: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowWebmail.key = "Webmail"
        rowWebmail.value = ""
        rowWebmail.section = "1"
        rowWebmail.types = NSSet(array: Array<Type>([typeRegularMail, typeGmail, typeHotmail, typeYahooMail]))
        
        let rowBankName: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowBankName.key = "Bank Name"
        rowBankName.value = ""
        rowBankName.section = "1"
        rowBankName.types = NSSet(array: [typeBankAccount])
        
        let rowOwner: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowOwner.key = "Owner"
        rowOwner.value = ""
        rowOwner.section = "1"
        rowOwner.types = NSSet(array: Array<Type>([typeBankAccount, typeCreditCard]))
        
        let rowAccount: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowAccount.key = "Account#"
        rowAccount.value = ""
        rowAccount.section = "1"
        rowAccount.types = NSSet(array: [typeBankAccount])
        
        let rowPin: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowPin.key = "PIN"
        rowPin.value = ""
        rowPin.section = "1"
        rowPin.types = NSSet(array: Array<Type>([typeBankAccount, typeCreditCard]))
        
        let rowSwift: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowSwift.key = "Swift"
        rowSwift.value = ""
        rowSwift.section = "1"
        rowSwift.types = NSSet(array: [typeBankAccount])
        
        let rowIban: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowIban.key = "IBAN"
        rowIban.value = ""
        rowIban.section = "1"
        rowIban.types = NSSet(array: [typeBankAccount])
        
        let rowNumber: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowNumber.key = "Number"
        rowNumber.value = ""
        rowNumber.section = "1"
        rowNumber.types = NSSet(array: Array<Type>([typeCreditCard, typeID, typeDriverLicence, typeMembership, typePassport]))
        
        let rowCardHolder: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowCardHolder.key = "Cardholder"
        rowCardHolder.value = ""
        rowCardHolder.section = "1"
        rowCardHolder.types = NSSet(array: [typeCreditCard])
        
        let rowValid: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowValid.key = "Valid"
        rowValid.value = ""
        rowValid.section = "1"
        rowValid.types = NSSet(array: [typeCreditCard])
        
        let rowCvc: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowCvc.key = "CVC"
        rowCvc.value = ""
        rowCvc.section = "1"
        rowCvc.types = NSSet(array: [typeCreditCard])
        
        let rowDateOfBirth: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowDateOfBirth.key = "Date of birth"
        rowDateOfBirth.value = ""
        rowDateOfBirth.section = "1"
        rowDateOfBirth.types = NSSet(array: Array<Type>([typeID, typePassport]))
        
        let rowPlaceOfBirth: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowPlaceOfBirth.key = "Place of birth"
        rowPlaceOfBirth.value = ""
        rowPlaceOfBirth.section = "1"
        rowPlaceOfBirth.types = NSSet(array: Array<Type>([typeID, typePassport]))
        
        let rowDateOfIssue: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowDateOfIssue.key = "Date of issue"
        rowDateOfIssue.value = ""
        rowDateOfIssue.section = "1"
        rowDateOfIssue.types = NSSet(array: Array<Type>([typeID, typeDriverLicence, typePassport]))
        
        let rowDateOfExpiry: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowDateOfExpiry.key = "Date of Expiry"
        rowDateOfExpiry.value = ""
        rowDateOfExpiry.section = "1"
        rowDateOfExpiry.types = NSSet(array: Array<Type>([typeID, typeDriverLicence, typePassport]))
        
        let rowFullName: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowFullName.key = "Full Name"
        rowFullName.value = ""
        rowFullName.section = "1"
        rowFullName.types = NSSet(array: [typeDriverLicence])
        
        let rowVehicleTypes: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowVehicleTypes.key = "Vehicle Types"
        rowVehicleTypes.value = ""
        rowVehicleTypes.section = "1"
        rowVehicleTypes.types = NSSet(array: [typeDriverLicence])
        
        let rowOrg: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowOrg.key = "Org"
        rowOrg.value = ""
        rowOrg.section = "1"
        rowOrg.types = NSSet(array: [typeMembership])
        
        let rowTelephone: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowTelephone.key = "Telephone"
        rowTelephone.value = ""
        rowTelephone.section = "1"
        rowTelephone.types = NSSet(array: [typeMembership])
        
        let rowSince: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowSince.key = "Since"
        rowSince.value = ""
        rowSince.section = "1"
        rowSince.types = NSSet(array: [typeMembership])
        
        let rowExpires: Row = NSEntityDescription.insertNewObjectForEntityForName("Row", inManagedObjectContext: moc) as! Row
        rowExpires.key = "Expires"
        rowExpires.value = ""
        rowExpires.section = "1"
        rowExpires.types = NSSet(array: [typeMembership])
        
        // MARK: - Save
        var error: NSError?
        do {
            try moc.save()
        } catch let error1 as NSError {
            error = error1
            print("finish error: \(error!.localizedDescription)")
            abort()
        }
    }

            do {
                try managedObjectContext.save()
            } catch let error as NSError {
                print("Error deleting \(entityDescription) - error:\(error)")
            }
        } catch let error as NSError {
            print("\(error.localizedDescription)")
        }
    }
}
