applied changes to client.py