a) change other files accordingly
b) change the message encoder to take in a message object