     
     var serviceId = CBUUID(string: "7D912F17-0583-4A1A-A499-205FF6835514")
     var remotePeripheral: CBPeripheral? = nil
-    var remotePeerStatus = Status.unknown
     var pairingStatusCharacteristic = CBMutableCharacteristic(
         type: CBUUID(string: "ECC2D7D1-FB7C-4AF2-B068-0525AEFD7F53"),
         properties: .notify,
         value: nil,
         permissions: .readable)
+    
+    var remotePeerStatus = Status.unknown {
+        didSet {
+            checkForCompletion()
+        }
+    }
     
     var status: Status = .unknown {
         didSet {

        peripheralManager.startAdvertising(nil)
        centralManager.scanForPeripherals(withServices: [serviceId], options: nil)
        status = .scanning
    }
}


                NSKeyedArchiver.archivedData(withRootObject: status.rawValue),
                for: pairingStatusCharacteristic,
                onSubscribedCentrals: nil)
            
            checkForCompletion()
        }
    }
    
