refine messages.