refactoring (to match updated client_proxy.py)