work with websocket