updated flash messages to view