ED code with improved perturbations