added websocket handling