make more use of msg_types