diff --git a/tsg_util/preferencesForm.m b/tsg_util/preferencesForm.m
index fd01d1cd1149f4407de3787b22496fc19c0c1032..7ee13b434c179a57a5e1c7cfb13acedfa434ce73 100644
--- a/tsg_util/preferencesForm.m
+++ b/tsg_util/preferencesForm.m
@@ -796,24 +796,15 @@ uiwait(hPreferencesFig);
     tsg.preference.ssps_stdmax = ...
       get(prefs.PREFERENCES_SSPS_STDMAX, 'string');
     
-    % Smoothing of tsg time series over interval in minutes
-    % -------------------------------------------------------
-    hour = floor(str2double(tsg.preference.dt_smooth)/60);
-    min = mod(str2double(tsg.preference.dt_smooth), 60);
-    smooth = datenum(0, 0, 0, hour, min , 0);
-    tsg.cst.TSG_DT_SMOOTH = smooth;
-    
-    tsg.SSPS_STDMAX = str2double(tsg.preference.ssps_stdmax);
-    
-    hour = floor(str2double(tsg.preference.ws_timediff)/60);
-    min = mod(str2double(tsg.preference.ws_timediff), 60);
-    timediff = datenum(0, 0, 0, hour, min , 0);
-    tsg.cst.TSG_WS_TIMEDIFF = timediff;
 
     % Save tsg structure
     % ------------------
     setappdata(hTsgGUI, 'tsg_data', tsg);
     
+    % update structure tsg with derived value
+    % ---------------------------------------
+    updateTsgStructWithSmoothVars(hTsgGUI)
+    
     % fill tsg calibration variables
     % ------------------------------
     updateTsgStructWithCalCoeff(hTsgGUI);
diff --git a/tsg_util/tsg_preferences.m b/tsg_util/tsg_preferences.m
index 0d5ea1e0978b3d963da314ff18b09cc7d85cf7f9..deb8e72c9623f260e70eb47949da07dbb43fa722 100644
--- a/tsg_util/tsg_preferences.m
+++ b/tsg_util/tsg_preferences.m
@@ -103,25 +103,14 @@ tsg = getappdata( hTsgGUI, 'tsg_data');
 % -----------------------------------
 tsg.preference = preference;
 
-% Initialize some values for smoothing
-% -------------------------------------------------------
-hour = floor(str2double(tsg.preference.dt_smooth)/60);
-min = mod(str2double(tsg.preference.dt_smooth), 60);
-smooth = datenum(0, 0, 0, hour, min , 0);
-tsg.cst.TSG_DT_SMOOTH = smooth;
-tsg.SSPS_STDMAX = str2double(tsg.preference.ssps_stdmax);
-
-hour = floor(str2double(tsg.preference.ws_timediff)/60);
-min = mod(str2double(tsg.preference.ws_timediff), 60);
-timediff = datenum(0, 0, 0, hour, min , 0);
-tsg.cst.TSG_WS_TIMEDIFF = timediff;
-% tsg.cst
-% tsg.SSPS_STDMAX
-
 % Save structure tsg
 % ------------------
 setappdata( hTsgGUI, 'tsg_data', tsg);
 
+% update structure tsg with derived value
+% ---------------------------------------
+updateTsgStructWithSmoothVars(hTsgGUI)
+
 % display waitbar
 % ---------------
 waitbar( 1/2, wb, 'loading structure tsg' );
diff --git a/tsg_util/updateTsgStructWithSmoothVars.m b/tsg_util/updateTsgStructWithSmoothVars.m
new file mode 100644
index 0000000000000000000000000000000000000000..3e6483062132da93f1bbcac7af7e2838c56de0d8
--- /dev/null
+++ b/tsg_util/updateTsgStructWithSmoothVars.m
@@ -0,0 +1,48 @@
+function updateTsgStructWithSmoothVars(hMainFig)
+%
+% This function is called after change option/parameter from preferenceForm
+% or tsg_preference
+%
+% Input
+% -----
+% hMainFig ............ Handle to the main user interface
+%
+% $Id$
+
+
+% Get the data from the application GUI
+% -------------------------------------
+tsg = getappdata( hMainFig, 'tsg_data');
+
+% use in tsg-average by tsg.cst.TSG_DT_SMOOTH
+% convert this value minute with datenum
+% ---------------------------------------------
+hour = floor(str2double(tsg.preference.dt_smooth)/60);
+min = mod(str2double(tsg.preference.dt_smooth), 60);
+smooth = datenum(0, 0, 0, hour, min , 0);
+tsg.cst.TSG_DT_SMOOTH = smooth;
+
+% Salinity, in 1 hour interval, should not depart the average for more
+% than SAL_STD_MAX standard deviation
+% -------------------------------------
+tsg.SSPS_STDMAX = str2double(tsg.preference.ssps_stdmax);
+
+% Maximum time difference between tsg data and water sample used to
+% compute the difference 
+% convert this value minute with datenum
+% ------------------------------------
+hour = floor(str2double(tsg.preference.ws_timediff)/60);
+min = mod(str2double(tsg.preference.ws_timediff), 60);
+timediff = datenum(0, 0, 0, hour, min , 0);
+tsg.cst.TSG_WS_TIMEDIFF = timediff;
+
+% uncomment for debug
+% -------------------
+tsg.cst
+tsg.SSPS_STDMAX
+
+% Save tsg structure
+% ------------------
+setappdata( hMainFig, 'tsg_data', tsg);
+
+end
diff --git a/tsgqc.m b/tsgqc.m
index 1d6cafb37ac3c85b8d7a5748178ddb99d0f2938f..a8c2b6df7f81c59cab35b4e6aaa9863f87358758 100644
--- a/tsgqc.m
+++ b/tsgqc.m
@@ -39,8 +39,8 @@ global GOSUD_FORMAT_VERSION
 % 0.90x -> 1.0RCx
 % -------------------------------------------------------------------
 VERSION      = 1.440;  % -> 1.44
-CHAR_VERSION = '1.44';
-DATE_VERSION = '13 jan 2016';
+CHAR_VERSION = '1.440';
+DATE_VERSION = 'jan 14 2016';
 
 % netcdf file version, see DATA FORMAT TSG document:
 % CORTSG_format_gosud.doc