added flash messages to type form