Added websocket functionality