creating function to create messages