             self.connectedPeers.append(peer)
         }
         
-        peerManager.save(peer: peer)
-        self.delegate?.clink(self, didConnectPeer: peer)
-        
-        peripheral.discoverServices([serviceId])
-    }
-    
-    public final func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?) {
-        if self.logLevel == .verbose { print("calling \(#function)") }
-        
-        if let err = error {
-            if self.logLevel == .verbose { print(err) }
-            self.delegate?.clink(self, didCatchError: err)
-        }
-        
-        if let i = self.connectedPeers.index(where: { $0.id == peripheral.identifier }) {
-            let peer = self.connectedPeers[i]
-            
-            self.delegate?.clink(self, didDisconnectPeer: peer)
-            
-            self.connectedPeers.remove(at: i)
-        }
-        
-        let peerManager = self.peerManager ?? self
-        
-        if peerManager.getSavedPeer(withId: peripheral.identifier) != nil {
-            peripheral.delegate = self
-            
-            let peer = ClinkPeer(peripheral: peripheral)
-            
-            if let i = self.connectedPeers.index(where: { $0.id == peripheral.identifier }) {
-                self.connectedPeers[i] = peer
-            } else {
-                self.connectedPeers.append(peer)
-            }
-            
-            self.centralManager.connect(peripheral, options: nil)
-        }
-    }
-    
-    public final func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?) {
-        if let err = error, self.logLevel == .verbose { print(print("\(#function)\n\(err)\n")) }
-        
-        if let e = error {
-            self.delegate?.clink(self, didCatchError: e)
-        }
-        
-        peripheral.delegate = self
-        
-        let peer = ClinkPeer(peripheral: peripheral)
-        
-        if let i = self.connectedPeers.index(where: { $0.id == peripheral.identifier }) {
-            self.connectedPeers[i] = peer
-        } else {
-            self.connectedPeers.append(peer)
-        }
-        
         self.centralManager.connect(peripheral, options: nil)
     }
 }

        guard
            let characteristics = service.characteristics,
            service.uuid == serviceId
            else {
                return
        }
        
        for characteristic in characteristics {

        let peer = ClinkPeer(peripheral: peripheral)
        let peerManager = self.peerManager ?? self
        
        peerManager.save(peer: peer)
        
        self.connect(peerWithId: peripheral.identifier)
        self.delegate?.clink(self, didDiscoverPeer: peer)
        
        central.connect(peripheral, options: nil)
    }
    
    public final func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {
        if self.logLevel == .verbose { print("calling \(#function)") }
        
        self.connect(peerWithId: peripheral.identifier)
        
        if let i = connectedPeers.index(where: { $0.id == peripheral.identifier }) {
            self.delegate?.clink(self, didConnectPeer: connectedPeers[i])
        }
        
        peripheral.discoverServices([serviceId])
    }
    
    public final func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?) {
        if self.logLevel == .verbose { print("calling \(#function)") }
        
        if let err = error {
            if self.logLevel == .verbose { print(err) }
            self.delegate?.clink(self, didCatchError: err)
        }
        
        if let i = self.connectedPeers.index(where: { $0.id == peripheral.identifier }) {
            let peer = self.connectedPeers[i]
            
            self.delegate?.clink(self, didDisconnectPeer: peer)
            
            self.connectedPeers.remove(at: i)
        }
        
        self.connect(peerWithId: peripheral.identifier)
    }
    
    public final func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?) {
        if let err = error, self.logLevel == .verbose { print(print("\(#function)\n\(err)\n")) }
        
        if let e = error {
            self.delegate?.clink(self, didCatchError: e)
        }
        
        peripheral.delegate = self
        
        let peer = ClinkPeer(peripheral: peripheral)
        
        if let i = self.connectedPeers.index(where: { $0.id == peripheral.identifier }) {
            self.connectedPeers[i] = peer
