displaying the right flash message