replacing updated client.py