added createMessage method