     }
     
     func setUpSession() {
-        session = MCSession(peer: self.myPeerId, securityIdentity: nil, encryptionPreference: .Required)
         session.delegate = self
     }
     // MARK: Methods for host

    
    public init(serviceType: String, myPeerId: MCPeerID) {
        self.serviceType = serviceType

        self.myPeerId = myPeerId

//        _serviceAdvertiser = MCNearbyServiceAdvertiser(peer: myPeerId,
//                                                       discoveryInfo: ["peerType": "host"], serviceType: serviceType)
//        _serviceBrowser = MCNearbyServiceBrowser(peer: myPeerId, serviceType: serviceType)

    }
    
//    public convenience init(serviceType: String) {

                // If currently a guest, stop looking for host
                stopSearchingForHosts()
                
                if self.host == peerID {
                    // Pass to delegate
                    delegate?.connectedToPeer(peerID)
                }
            } else {
                DLog("%@", "not connected to \(session.hashValue)")
                // If self is disconnected or current host is disconnected
                print("passed in \(session.connectedPeers)")
                print("self: \(self.session.connectedPeers)")
                print(session == self.session)
                
                if self.host == nil {
                    DLog("%@", "Host was removed")
                    
                    if self.host == peerID {
                        dispatch_sync(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)) {
                            self.session.disconnect()
                        }
                    }
                    delegate?.disconnectedFromSession()
                }
            }
