extract types to be created for message into separate class