adding message functionality