changed for work with protocols.py