improve the message class