 
 final class Browser: NSObject {
     private let browser: MCNearbyServiceBrowser
-    private let didFindPeer: (PeerIdentifier) -> Void
-    private let didLosePeer: (PeerIdentifier) -> Void
+    private let didFindPeerHandler: (PeerIdentifier) -> Void
+    private let didLosePeerHandler: (PeerIdentifier) -> Void
     var didChangeListeningHandler: ((Bool) -> Void)?
     internal private(set) var listening: Bool = false {
         didSet {

                  foundPeer: (PeerIdentifier) -> Void,
                  lostPeer: (PeerIdentifier) -> Void) {
        browser = MCNearbyServiceBrowser(peer: MCPeerID(displayName: NSUUID().UUIDString), serviceType: serviceType)
        self.didFindPeer = foundPeer
        self.didLosePeer = lostPeer
        super.init()
        browser.delegate = self
    }

    func browser(browser: MCNearbyServiceBrowser, lostPeer peerID: MCPeerID) {
        do {
            let peerIdentifier = try PeerIdentifier(mcPeer: peerID)
            didLosePeerHandler(peerIdentifier)
        } catch let error {
            print("cannot parse identifier \"\(peerID.displayName)\" because of error: \(error)")
        }
