added and converting protocol.cc