finish edit, update, index and destroy