delete function update