diff --git a/src/gui/export/export_masschroq_dialog/export_masschroq_dialog.ui b/src/gui/export/export_masschroq_dialog/export_masschroq_dialog.ui
index 3bdb1e06712d0169cffd9d61c4d73e70c8c627fd..25fe27a49c6894e063f73059261cc2e4f1b3583c 100644
--- a/src/gui/export/export_masschroq_dialog/export_masschroq_dialog.ui
+++ b/src/gui/export/export_masschroq_dialog/export_masschroq_dialog.ui
@@ -271,16 +271,58 @@
          <property name="title">
           <string>XIC extraction parameters</string>
          </property>
-         <layout class="QHBoxLayout" name="horizontalLayout_6">
+         <layout class="QVBoxLayout" name="verticalLayout_10">
           <item>
-           <widget class="QLabel" name="label_5">
-            <property name="text">
-             <string>XIC range</string>
-            </property>
-           </widget>
+           <layout class="QHBoxLayout" name="horizontalLayout_7">
+            <item>
+             <widget class="QLabel" name="label_5">
+              <property name="text">
+               <string>XIC range</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="pappso::PrecisionWidget" name="xicRangeWidget" native="true">
+              <property name="minimumSize">
+               <size>
+                <width>2</width>
+                <height>2</height>
+               </size>
+              </property>
+              <property name="baseSize">
+               <size>
+                <width>0</width>
+                <height>0</height>
+               </size>
+              </property>
+             </widget>
+            </item>
+           </layout>
           </item>
           <item>
-           <widget class="pappso::PrecisionWidget" name="xicRangeWidget" native="true"/>
+           <layout class="QHBoxLayout" name="horizontalLayout_8">
+            <item>
+             <widget class="QLabel" name="label_6">
+              <property name="text">
+               <string>inside range, take the</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QComboBox" name="sumMaxComboBox">
+              <item>
+               <property name="text">
+                <string>max</string>
+               </property>
+              </item>
+              <item>
+               <property name="text">
+                <string>sum</string>
+               </property>
+              </item>
+             </widget>
+            </item>
+           </layout>
           </item>
          </layout>
         </widget>
diff --git a/src/gui/export/export_masschroq_dialog/exportmasschroqdialog.cpp b/src/gui/export/export_masschroq_dialog/exportmasschroqdialog.cpp
index 3630c0a12ae0f673fa62894cbfb7f847f6c313ac..a0864f0206a3cfd7182b9942a5913989b1f371ad 100644
--- a/src/gui/export/export_masschroq_dialog/exportmasschroqdialog.cpp
+++ b/src/gui/export/export_masschroq_dialog/exportmasschroqdialog.cpp
@@ -102,8 +102,10 @@ ExportMasschroqDialog::setMasschroqFileParameters(
   ui->ms2TendencySpinBox->setValue(params.ms2_tendency_half_window);
   ui->ms2SmoothingSpinBox->setValue(params.ms2_smoothing_half_window);
   ui->ms1SmoothingSpinBox->setValue(params.ms1_smoothing_half_window);
-  
+
   ui->xicRangeWidget->setPrecision(params.xic_extraction_range);
+
+  ui->sumMaxComboBox->setCurrentText(params.xic_extraction_method);
 }
 
 
@@ -134,8 +136,11 @@ ExportMasschroqDialog::getMasschroqFileParameters() const
   params.ms2_tendency_half_window  = ui->ms2TendencySpinBox->value();
   params.ms2_smoothing_half_window = ui->ms2SmoothingSpinBox->value();
   params.ms1_smoothing_half_window = ui->ms1SmoothingSpinBox->value();
-  
+
   params.xic_extraction_range = ui->xicRangeWidget->getPrecision();
+
+  params.xic_extraction_method = ui->sumMaxComboBox->currentText();
+
   return params;
 }
 
diff --git a/src/gui/export/export_masschroq_dialog/masschroqfileparameters.cpp b/src/gui/export/export_masschroq_dialog/masschroqfileparameters.cpp
index c833a0fa83570b35c31ff32a02d6fd873728b9f2..533c3b97a5ee86af0629e9c7e1138da3642060b4 100644
--- a/src/gui/export/export_masschroq_dialog/masschroqfileparameters.cpp
+++ b/src/gui/export/export_masschroq_dialog/masschroqfileparameters.cpp
@@ -65,6 +65,9 @@ MasschroqFileParameters::save() const
 
   settings.setValue("export_masschroqml/xic_extraction_range",
                     xic_extraction_range->toString());
+
+  settings.setValue("export_masschroqml/xic_extraction_method",
+                    xic_extraction_method);
 }
 void
 MasschroqFileParameters::load()
@@ -120,4 +123,8 @@ MasschroqFileParameters::load()
   xic_extraction_range = pappso::Precision::fromString(
     settings.value("export_masschroqml/xic_extraction_range", "10 ppm")
       .toString());
+
+  xic_extraction_method =
+    settings.value("export_masschroqml/xic_extraction_method", "max")
+      .toString();
 }
diff --git a/src/gui/export/export_masschroq_dialog/masschroqfileparameters.h b/src/gui/export/export_masschroq_dialog/masschroqfileparameters.h
index 916949c1610dd05fabe321a4acfb25dbf1a5c9d6..fb01242daca0dd96150e32e1100ecb577c6644e7 100644
--- a/src/gui/export/export_masschroq_dialog/masschroqfileparameters.h
+++ b/src/gui/export/export_masschroq_dialog/masschroqfileparameters.h
@@ -57,4 +57,6 @@ struct MasschroqFileParameters
   unsigned int ms1_smoothing_half_window;
   
   pappso::PrecisionP xic_extraction_range;
+  
+  QString xic_extraction_method; //sum or max
 };
diff --git a/src/output/masschroqml.cpp b/src/output/masschroqml.cpp
index ebd50f29739394c5b7701d276188b40129b41a48..809cbbf80b324eb839b0b5608f0e679b394fb0d3 100644
--- a/src/output/masschroqml.cpp
+++ b/src/output/masschroqml.cpp
@@ -299,7 +299,7 @@ MassChroQml::writeQuantificationMethods()
   _output_stream->writeAttribute("id", "quant1");
   //<xic_extraction xic_type="sum">
   _output_stream->writeStartElement("xic_extraction");
-  _output_stream->writeAttribute("xic_type", "max");
+  _output_stream->writeAttribute("xic_type", m_params.xic_extraction_method);
   _output_stream->writeComment("max : XIC on BasePeak; sum : XIC on TIC");
   //<ppm_range min="10" max="10"/><!--For XIC extraction on Da use: mz_range-->
 
@@ -311,11 +311,15 @@ MassChroQml::writeQuantificationMethods()
     }
   if(m_params.xic_extraction_range->getUnit() == pappso::PrecisionUnit::dalton)
     {
-      _output_stream->writeStartElement("dalton_range");
+      _output_stream->writeStartElement("mz_range");
     }
   else
     {
-        //error
+      // error
+      throw pappso::PappsoException(
+        QObject::tr("error : this precision unit is not taken into account by "
+                    "MassChroQ : %1\n")
+          .arg(m_params.xic_extraction_range->toString()));
     }
   _output_stream->writeAttribute(
     "min", QString("%1").arg(m_params.xic_extraction_range->getValue()));