Improving client.py