Added getMessageById method