finish editing and delete function of app controller