update delet function