funciton bugs in the client.py file