Update delete function