   
   
   // return the latest message received for a given measurement string name
-  open func getLatest(_ key:NSString) -> VehicleMeasurementResponse {
-    if let entry = latestVehicleMeasurements[key] {
-      return entry as! VehicleMeasurementResponse
-    }
-    return VehicleMeasurementResponse()
-  }
-  
+//  open func getLatest(_ key:NSString) -> VehicleMeasurementResponse {
+//    if let entry = latestVehicleMeasurements[key] {
+//      return entry as! VehicleMeasurementResponse
+//    }
+//    return VehicleMeasurementResponse()
+//  }
+  
+  open func getLatest(_ key:NSString) -> VehicleMeasurementResponse? {
+    return latestVehicleMeasurements[key]
+  }
   
   // add a callback for a given measurement string name
   open func addMeasurementTarget<T: AnyObject>(_ key: NSString, target: T, action: @escaping (T) -> (NSDictionary) -> ()) {

  // default callback action for measurement messages not registered above
  fileprivate var defaultMeasurementCallback : TargetAction?
  // dictionary holding last received measurement message for each measurement type
  fileprivate var latestVehicleMeasurements: NSMutableDictionary! = NSMutableDictionary()
  
  // dictionary for holding registered diagnostic message callbacks
  // pairing bus-id-mode(-pid) String with callback action

        ///////////////////////////////////////////
        if msg.type == .simple {
          decoded = true
          //let name = msg.simpleMessage.name
          let name = msg.simpleMessage.name as NSString
          
          // build measurement message
          let rsp : VehicleMeasurementResponse = VehicleMeasurementResponse()
          rsp.timestamp = Int(truncatingBitPattern:msg.timestamp)
          //rsp.name = msg.simpleMessage.name as NSString
          
          rsp.name = name
          
          if msg.simpleMessage.value.hasStringValue {rsp.value = msg.simpleMessage.value.stringValue as AnyObject}
          if msg.simpleMessage.value.hasBooleanValue {rsp.value = msg.simpleMessage.value.booleanValue as AnyObject}
          if msg.simpleMessage.value.hasNumericValue {rsp.value = msg.simpleMessage.value.numericValue as AnyObject}
