added the message templates and functions for popup