created an edit action, view and flash notice