working websocket version