replaced request with websocket