Switch example to websocket