First try at perturbation implementation (on the CPU for now).