update delete func.