diff --git a/tracy/tools/soltracy.cc b/tracy/tools/soltracy.cc
index e7443e15f2280c7a14df3816bfaa8a0761452b3e..ceba81b56b308737e0da24e29728d4f869677ba2 100644
--- a/tracy/tools/soltracy.cc
+++ b/tracy/tools/soltracy.cc
@@ -71,6 +71,12 @@ extern bool  freq_map;
      ReadCh(chamber_file); /* read vacuum chamber from a file "Apertures.dat" , soleil version*/
   PrintCh(); // print chamber into chamber.out
  
+  //get_matching_params_scl(); // get tunes and beta functions at entrance
+  get_alphac2(); // compute up to 3rd order mcf
+  //cout << endl << "computing tune shifts" << endl;
+  //dnu_dA(10e-3, 5e-3, 0.002);
+  //get_ksi2(0.0); // this gets the chromas and writes them into chrom2.out
+
  
   // compute tunes by tracking (should be the same as by DA)
   if (TuneTracFlag == true) {
@@ -102,13 +108,12 @@ extern bool  freq_map;
     printglob();                      /* print parameter list */
   }
 
-    //SetKLpar(ElemIndex("QT"), 1, 2L,   0.001026770838382);
-  
   // coupling calculation
    if (CouplingFlag == true){
      Ring_GetTwiss(chroma=true, 0.0);  /* Compute and get Twiss parameters */
      printlatt();                      /* dump linear lattice functions into "linlat.dat" */
-  //   Coupling_Edwards_Teng();
+     GetEmittance(ElemIndex("cav"), true);
+     Coupling_Edwards_Teng();
      printglob();   /* print parameter list */
    }
 
@@ -117,7 +122,8 @@ extern bool  freq_map;
     SetErr();
     Ring_GetTwiss(chroma=true, 0.0);  /* Compute and get Twiss parameters */
     printlatt();                      /* dump linear lattice functions into "linlat.dat" */
-//    Coupling_Edwards_Teng();
+    Coupling_Edwards_Teng();
+    GetEmittance(ElemIndex("cav"), true);
     printglob();   /* print parameter list */
   }
 
@@ -137,6 +143,40 @@ extern bool  freq_map;
       printglob(); 
     }
   }
+
+ /******************************************************************************************/
+ // COMPUTATION PART after setting the model
+ /******************************************************************************************/
+
+  //first print the full lattice with error as a flat file
+  prtmfile("flat_file_error.dat"); // writes flat file   /* very important file for debug*/
+
+// computes TuneShift with amplitudes
+  if (AmplitudeTuneShiftFlag == true){
+    if (ChamberFlag == true ){
+    	NuDx(_AmplitudeTuneShift_nxpoint,
+	         _AmplitudeTuneShift_nypoint, _AmplitudeTuneShift_nturn,
+	         _AmplitudeTuneShift_xmax, _AmplitudeTuneShift_ymax,
+	         _AmplitudeTuneShift_delta);
+      //NuDx(31L,21L,516L,0.025,0.005,dP);
+      }
+      else{ // Utility ?
+        NuDx(50L,30L,516L,0.035,0.02,dP);
+      }
+
+  }
+  if (EnergyTuneShiftFlag == true){
+    if (ChamberFlag == true ){
+    	NuDp(_EnergyTuneShift_npoint,
+    	     _EnergyTuneShift_nturn, _EnergyTuneShift_deltamax);
+      //NuDp(31L,1026L,0.06);
+      }
+      else{ // utility ?
+        NuDp(31L,1026L,0.06);
+      }
+
+  }
+
  // Computes FMA
   if (FmapFlag == true){
     if (ChamberFlag == true ){
@@ -148,7 +188,7 @@ extern bool  freq_map;
       if (DetailedFMAFlag == true)
         fmap(100,50,1026,20e-3,5e-3,0.0,true);
       }
-      else{
+      else{ // Utility
         if (ExperimentFMAFlag == true)
           fmap(40,12,258,-32e-3,5e-3,0.0,true);
         if (DetailedFMAFlag == true)
@@ -169,31 +209,6 @@ extern bool  freq_map;
 	 // MomentumAcceptance(1L, 108L, 0.01, 0.05, 100L, -0.01, -0.05, 100L);
   }
 
-  // computes TuneShift with amplitudes
-  if (AmplitudeTuneShiftFlag == true){
-    if (ChamberFlag == true ){
-    	NuDx(_AmplitudeTuneShift_nxpoint,
-	         _AmplitudeTuneShift_nypoint, _AmplitudeTuneShift_nturn,
-	         _AmplitudeTuneShift_xmax, _AmplitudeTuneShift_ymax,
-	         _AmplitudeTuneShift_delta);
-      //NuDx(31L,21L,516L,0.025,0.005,dP);
-      }
-      else{
-        NuDx(50L,30L,516L,0.035,0.02,dP);
-      }
-
-  }
-  if (EnergyTuneShiftFlag == true){
-    if (ChamberFlag == true ){
-    	NuDp(_EnergyTuneShift_npoint,
-    	     _EnergyTuneShift_nturn, _EnergyTuneShift_deltamax);
-      //NuDp(31L,1026L,0.06);
-      }
-      else{
-        NuDp(31L,1026L,0.06);
-      }
-
-  }
 
   // induced amplitude 
   if (InducedAmplitudeFlag == true){
diff --git a/tracy/tools/testtracy.cc b/tracy/tools/testtracy.cc
index 4112fc5ee26117d723567eddfa498028c19dd936..8ac5b639e162f1a6934e6625dc9407f7eb5a051f 100644
--- a/tracy/tools/testtracy.cc
+++ b/tracy/tools/testtracy.cc
@@ -450,7 +450,7 @@ prtmfile("flat_file.dat"); // writes flat file   /* very important file for debu
   if (false) {
     cout << endl;
     cout << "computing tune shifts" << endl;
-    dnu_dA(20e-3, 10e-3, 0.0);
+    dnu_dA(25e-3, 5e-3, 0.0);
     get_ksi2(delta); // this gets the chromas and writes them into chrom2.out
  // get_ksi2(5.0e-2); // this gets the chromas and writes them into chrom2.out
   }