update before delete