few changes in client.py