implemented protocols in server1.py CODE IS A MESS