added flash messages, end of class