added flash messages to post update/create