updated server.py and renamed client.py to endpoint.py