refactor the message part