solution to websocket