             } else if attempts > 4 {
                 timer.invalidate()
                 
-                return fn(OpperationResult.error(OpperationError.centralManagerFailedToPowerOn))
-            }
-        }
-    }
-    
-    private func ensure(peripheralManagerHasState state: CBManagerState, fn: @escaping (OpperationResult<Void>) -> Void) {
-        if self.peripheralManager.state == .poweredOn { return fn(OpperationResult.success(result: ()) )}
+                return fn(.error(.centralManagerFailedToPowerOn))
+            }
+        }
+    }
+    
+    private func ensure(
+        peripheralManagerHasState state: CBManagerState,
+        fn: @escaping (OpperationResult<Void>) -> Void)
+    {
+        if self.peripheralManager.state == .poweredOn { return fn(.success(result: ()) )}
         
         var attempts = 0
         Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { timer in

            guard
                let peer = peerManager.getSavedPeer(withId: peerId),
                let peripheral = peripherals.first
                else {
                    guard peripherals.count > 0 else { return }
                    
                    peerManager.save(peer: ClinkPeer(id: peerId))
                    
                    return self.connect(peerWithId: peerId)
            }
            
            peripheral.delegate = self

        if self.logLevel == .verbose { print("calling \(#function)") }
        
        if activePairingTask?.remotePeripheral?.identifier != peripheral.identifier {
            if let i = self.connectedPeers.index(where: { $0.id == peripheral.identifier }) {
                self.connectedPeers.remove(at: i)
            }
            
            let peer = ClinkPeer(id: peripheral.identifier)
            let peerManager = self.peerManager ?? self
