changed the websocket to follow the protocol