change protocolversion to int