     }
 }
 
+extension CKAccountStatus: CustomStringConvertible {
+    public var description: String {
+        switch self {
+        case .available:
+            return "iCloud is available"
+        case .restricted:
+            return "iCloud settings are restricted by parental controls or a configuration profile"
+        case .noAccount:
+            return "the user not logged in"
+        case .couldNotDetermine:
+            return "please try again"
+        }
+    }
+}
 
 extension Data: CloudBackupable {
     func backupToCloud(completeHandler: @escaping ()->()) {

        let operation = CKQueryOperation(query: query)
        
        operation.recordFetchedBlock = { (record: CKRecord?) in
            
            guard let rawData = record?.value(forKey: self.recordKey) as? Data,
                let annoatations = rawData.toAnnoatations else { return }
            completed(annoatations)
        }
        
        operation.queryCompletionBlock = { (cursor, error) in
            guard error == nil else {
                print(error?.localizedDescription ?? "Error")
                return
            }
            
            //TODO: - end todo
        }

    func updateUserStatus(completed: @escaping (CKAccountStatus)->()) {
        
        container.accountStatus { (status, error) in
            let _ = error.map { self.text = " \($0)"}
            
            if status == .available {
                 self.requestPermission()
            }
            
            DispatchQueue.main.async {
                self.text = status.description
            }
            
            completed(status)
