modulus everywhere in protocol.py