changed websocket handler