writing helpers for flash messages