update generate perturbation