generate classes upon creating the protocol to reduce garbage