                 }
             }
         }
-        serverConfig.enabledOptions = options
         
         if let nameString = root[ConfigurationPropertyKey.nameKey] as? String {
             serverConfig.name = nameString
         }
+        
+        var threshold: Threshold?
+        if let thresholdsDict = jsonDictionary[ConfigurationPropertyKey.thresholdsKey] as? [String : AnyObject] {
+            let bg_high = thresholdsDict[ConfigurationPropertyKey.bg_highKey] as! Double
+            let bg_low = thresholdsDict[ConfigurationPropertyKey.bg_lowKey] as! Double
+            let bg_target_bottom = thresholdsDict[ConfigurationPropertyKey.bg_target_bottomKey] as! Double
+            let bg_target_top = thresholdsDict[ConfigurationPropertyKey.bg_target_topKey] as! Double
+            threshold = Threshold(bg_high: bg_high, bg_low: bg_low, bg_target_bottom: bg_target_bottom, bg_target_top: bg_target_top)
+        }
+
         
         var defaultsDefaults: Defaults?
         if let defaultsDictionary = root[ConfigurationPropertyKey.defaultsKey] as? [String: AnyObject] {

    public let careportalEnabled: Bool?
    public let enabledOptions: [EnabledOptions]?
    public let defaults: Defaults?
    public let unitsRoot: Units?
    public let head:String?
    public let version: String?

    case errorcodes = "errorcodes"
    case simplealarms = "simplealarms"
    case pushover = "pushover"
    case maker = "maker"
    case cob = "cob"
    case bwp = "bwp"
    case cage = "cage"
    case basal = "basal"
    
    public var description: String {
        return self.rawValue
