added getAllMessages