update delete func