add methods for class Message