ED code with perturbations