add message.type to model