helper functions for messaging