added flash message support