Added a msg rendering function.