modify ProtocolGraph and related file to match Graph function