             alert error.type
 
         peer.on "open", (peerId) =>
-            console.log "peer.on"
-            console.log "peerId: #{ peerId }"
 
             if who == "x"
-                console.log "acting as #{ who }, host"
 
                 peer.on "connection", (connection) =>
-                    console.log "new connection"
-                    console.log "peer #{ connection.peer } just connected to host #{ peerId }"
 
                     @connections.push connection
 

            message: message

        _.forEach @connections, (c) ->
            console.log "sending message to #{ c.peer }"
            c.send data

    listenForMessage: (connection) ->
        connection.on "data", (data) =>
            if data.type == "message"
                console.log "new message from #{ connection.peer }"

                messages = @state.messages
                messages.push data.message

                        if data.type == "newConnection"
                            peerIds = data.peerIds


                            _.forEach peerIds, (peerId) =>

                                connection = peer.connect peerId

