added websocket control