             let standStart = date
             let standEnd = standStart + Int(abs(x) * 60.0).seconds
             return HKCategorySample(type: ct, value: HKCategoryValueAppleStandHour.Stood.rawValue, startDate: standStart, endDate: standEnd)
+            
+        case HKWorkoutTypeIdentifier:
+            let workoutStart = date
+            let workoutEnd = workoutStart + Int(randNormal(100, 1)).minutes
+            let energyBurned = HKQuantity(unit: HKUnit.kilocalorieUnit(),
+                doubleValue: x)
+            let distance = HKQuantity(unit: HKUnit.mileUnit(),
+                doubleValue: y!)
+            let workoutDuration : NSTimeInterval = Double(randNormal(100, 1)*60)
+            let workoutTypeInt = randDiscUniform(0,56)
+            return HKWorkout(activityType: workoutTypesToGenerate[workoutTypeInt],
+                startDate: workoutStart, endDate: workoutEnd, duration: workoutDuration,
+                totalEnergyBurned: energyBurned, totalDistance: distance, metadata: nil)
 
         case HKCorrelationTypeIdentifierBloodPressure:
             let du = self.generatorUnits[HKQuantityTypeIdentifierBloodPressureDiastolic]!

    let excludes : [String] = [
        HKCategoryTypeIdentifierAppleStandHour,
        HKQuantityTypeIdentifierBasalBodyTemperature,
        HKQuantityTypeIdentifierBodyTemperature,
//        HKQuantityTypeIdentifierBasalEnergyBurned,
//        HKQuantityTypeIdentifierBloodAlcoholContent,
//        HKQuantityTypeIdentifierElectrodermalActivity,
//        HKQuantityTypeIdentifierForcedExpiratoryVolume1,
//        HKQuantityTypeIdentifierForcedVitalCapacity,
//        HKQuantityTypeIdentifierInhalerUsage,
//        HKQuantityTypeIdentifierLeanBodyMass,
//        HKQuantityTypeIdentifierNikeFuel,
//        HKQuantityTypeIdentifierNumberOfTimesFallen,
//        HKQuantityTypeIdentifierOxygenSaturation,
//        HKQuantityTypeIdentifierPeakExpiratoryFlowRate,
//        HKQuantityTypeIdentifierPeripheralPerfusionIndex,
//        HKQuantityTypeIdentifierRespiratoryRate
//        HKCategoryTypeIdentifierSleepAnalysis,
//        HKQuantityTypeIdentifierActiveEnergyBurned,
//        HKQuantityTypeIdentifierBloodGlucose,
    ]

    let generatorUnits : [String: HKUnit] = [

        }
    }

    public func minutesBetweenDate(startDate: NSDate, endDate: NSDate) -> Int
    {
        let calendar = NSCalendar.currentCalendar()
        let components = calendar.components([.Minute], fromDate: startDate, toDate: endDate, options: [])
        return components.minute
    }
    
    func nextSample(type: HKSampleType, asMale: Bool = true, date: NSDate, x: Double, y: Double?) -> HKSample? {
        switch type.identifier {
        case HKCategoryTypeIdentifierSleepAnalysis:
