implementing the perturbation - FINAL