     var startDate    : NSDate        { get }
     var endDate      : NSDate        { get }
     var numeralValue : Double?       { get }
-    var defaultUnit  : HKUnit?       { get }
     var hkType       : HKSampleType? { get }
-
-    func unitForSystem(metric: Bool) -> HKUnit?
 }
 
 @available(iOS 9.0, *)

    public var startDate    : NSDate
    public var endDate      : NSDate
    public var numeralValue : Double?
    public var defaultUnit  : HKUnit?
    public var hkType       : HKSampleType?
    public var aggOp        : HKStatisticsOptions



    public var startDate    : NSDate        { return statistic.startDate   }
    public var endDate      : NSDate        { return statistic.endDate     }
    public var hkType       : HKSampleType? { return statistic.hkType      }

    public init(statistic: HKStatistics, statsOption: HKStatisticsOptions) {
        self.statistic = statistic
        self.numeralValue = nil
        if ( statsOption.contains(.DiscreteAverage) ) {
            self.numeralValue = statistic.averageQuantity()?.doubleValueForUnit(hkType!.defaultUnit!)
        }
        if ( statsOption.contains(.DiscreteMin) ) {
            self.numeralValue = statistic.minimumQuantity()?.doubleValueForUnit(hkType!.defaultUnit!)
        }
        if ( statsOption.contains(.DiscreteMax) ) {
            self.numeralValue = statistic.maximumQuantity()?.doubleValueForUnit(hkType!.defaultUnit!)
        }
        if ( statsOption.contains(.CumulativeSum) ) {
            self.numeralValue = statistic.sumQuantity()?.doubleValueForUnit(hkType!.defaultUnit!)
        }
    }
}

