added flash message and styling