fixed update value function of Wagner