modified client.py