flash message functionality done