update function.clp