refine message structure.