adding support for flash messages