 }
 
 
+// MARK: - PERIPHERAL DELEGATE METHODS
+
 extension PairingTask: CBPeripheralDelegate {
     public func peripheral(_ peripheral: CBPeripheral, didReadRSSI RSSI: NSNumber, error: Error?) {
         guard peripheral.identifier == remotePeripheral?.identifier else { return }

    }
}

extension PairingTask: CBPeripheralManagerDelegate {
    public func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) {
        if peripheralManager.isAdvertising == false, isPairing, peripheralManager.state == .poweredOn {
            startPairing()
        }
    }
    
    public func peripheralManager(_ peripheral: CBPeripheralManager, didAdd service: CBService, error: Error?) {

    
    
    public func startPairing() {
        if peripheralManager.state == .poweredOn, centralManager.state == .poweredOn {
            let service = CBMutableService(type: serviceId, primary: true)
            service.characteristics = [pairingStatusCharacteristic]
            
            peripheralManager.add(service)
            centralManager.scanForPeripherals(withServices: [serviceId], options: nil)
            status = .scanning
        } else {
            Timer.scheduledTimer(withTimeInterval: 1, repeats: false) { _ in
                self.startPairing()
            }
        }
    }
    
    public func cancelPairing() {
