diff --git a/src/main/java/no/nibio/vips/model/yellowstemborertempmodel/YellowStemborerTempModel.java b/src/main/java/no/nibio/vips/model/yellowstemborertempmodel/YellowStemborerTempModel.java
index ca7fd2416d5e284ff98094303546586af343da87..7244505a373e7138e8e15b58414aa52ca5d9eaca 100644
--- a/src/main/java/no/nibio/vips/model/yellowstemborertempmodel/YellowStemborerTempModel.java
+++ b/src/main/java/no/nibio/vips/model/yellowstemborertempmodel/YellowStemborerTempModel.java
@@ -20,6 +20,8 @@
 package no.nibio.vips.model.yellowstemborertempmodel;
 
 import java.io.IOException;
+import java.math.BigDecimal;
+import java.math.BigInteger;
 import java.text.DecimalFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -60,13 +62,13 @@ public class YellowStemborerTempModel extends I18nImpl implements Model {
     
     
     // Threshold values
-    // MUST BE ADJUSTED!!!!!!
-    private final Double dd_lower = 0.0;
-    private final Double dd_upper = 40.0;
+    // TODO: ADJUST with actual biologically sensible defaults
+    private Double dd_lower = 0.0;
+    private Double dd_upper = 40.0;
     
-    private final Double THRESHOLD_1 = 260.0; // Egg to larvae
-    private final Double THRESHOLD_2 = 360.0; // Larvae to pupa
-    private final Double THRESHOLD_3 = 560.0; // Pupa to adult
+    private Double THRESHOLD_1 = 260.0; // Egg to larvae
+    private Double THRESHOLD_2 = 360.0; // Larvae to pupa
+    private Double THRESHOLD_3 = 560.0; // Pupa to adult
     
     public YellowStemborerTempModel()
     {
@@ -238,7 +240,35 @@ public class YellowStemborerTempModel extends I18nImpl implements Model {
     @Override
     public void setConfiguration(ModelConfiguration config) throws ConfigValidationException {
 
-        
+    	// Adjusting defaults
+    	try
+    	{
+	        if(config.getConfigParameter("THRESHOLD_1") != null)
+	        {
+	        	this.THRESHOLD_1 = this.modelUtil.getDouble(config.getConfigParameter("THRESHOLD_1"));
+	        }
+	        if(config.getConfigParameter("THRESHOLD_2") != null)
+	        {
+	        	this.THRESHOLD_2 = this.modelUtil.getDouble(config.getConfigParameter("THRESHOLD_2"));
+	        }
+	        if(config.getConfigParameter("THRESHOLD_3") != null)
+	        {
+	        	this.THRESHOLD_3 = this.modelUtil.getDouble(config.getConfigParameter("THRESHOLD_3"));
+	        }
+	        if(config.getConfigParameter("dd_lower") != null)
+	        {
+	        	this.dd_lower = this.modelUtil.getDouble(config.getConfigParameter("dd_lower"));
+	        }
+	        if(config.getConfigParameter("dd_upper") != null)
+	        {
+	        	this.dd_upper = this.modelUtil.getDouble(config.getConfigParameter("dd_upper"));
+	        }
+    	}
+    	catch(ClassCastException ex)
+    	{
+    		throw new ConfigValidationException(ex.getMessage());
+    	}
+    	
         // Init data matrix
         this.dataMatrix = new DataMatrix();
         
@@ -250,7 +280,6 @@ public class YellowStemborerTempModel extends I18nImpl implements Model {
         try
         {
             this.biofixDate = format.parse((String) config.getConfigParameter("biofixDate"));
-            System.out.println("BiofixDate=" + this.biofixDate);
         }
         catch(ParseException ex)
         {
@@ -328,5 +357,7 @@ public class YellowStemborerTempModel extends I18nImpl implements Model {
             today = cal.getTime();
         }
     }
+    
+    
 
 }
diff --git a/src/test/java/no/nibio/vips/model/yellowstemborertempmodel/YellowStemborerTempModelTest.java b/src/test/java/no/nibio/vips/model/yellowstemborertempmodel/YellowStemborerTempModelTest.java
index 1411a632169c3aa4fa319589f96d9fe7aef6a467..1d85d4044dbf2cf10ec65e1498123d9e2aff5cff 100644
--- a/src/test/java/no/nibio/vips/model/yellowstemborertempmodel/YellowStemborerTempModelTest.java
+++ b/src/test/java/no/nibio/vips/model/yellowstemborertempmodel/YellowStemborerTempModelTest.java
@@ -5,6 +5,7 @@
  */
 package no.nibio.vips.model.yellowstemborertempmodel;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import java.util.List;
 import no.nibio.vips.entity.ModelConfiguration;
 import no.nibio.vips.entity.Result;
@@ -53,14 +54,21 @@ public class YellowStemborerTempModelTest {
         ModelConfiguration config = wfr.getModelConfigurationWithWeatherData("/test_data_2019.json", YellowStemborerTempModel.MODEL_ID.toString());
         config.setConfigParameter("timeZone", "GMT+05:30");
         config.setConfigParameter("biofixDate", "2019-01-05");
+        config.setConfigParameter("THRESHOLD_1", 290.0);
+        config.setConfigParameter("THRESHOLD_2", 390.0);
+        config.setConfigParameter("THRESHOLD_3", 590);
+        config.setConfigParameter("dd_lower", 15);
+        config.setConfigParameter("dd_upper", 31.1);
         // Print the config
-        //System.out.println(config.toJSON());
+        System.out.println(config.toJSON());
         YellowStemborerTempModel instance = new YellowStemborerTempModel();
         instance.setConfiguration(config);
         
         List<Result> result = instance.getResult();
         assertNotNull(result);
         // Print the result
+        //ObjectMapper mapper = new ObjectMapper();
+        //System.out.println(mapper.writeValueAsString(result));
         //result.forEach(r->System.out.println(r));
     }