moving new_client.py to protocol.py