update switch to websocket