#7 added flash messages