adding websocket code