     let pedometer = CMPedometer()
     let motion = CMMotionManager()
     var totalSteps: Float = 0.0
-    
+    let motionQueue = OperationQueue()
     let numberToolbar: UIToolbar = UIToolbar()
     
     override func viewDidLoad() {

    func handleActivity(activity:CMMotionActivity?)->Void{
        // unwrap the activity and disp
        if let unwrappedActivity = activity {
            //DispatchQueue.main.async(){}
            NSLog("Walking: \(unwrappedActivity.walking)\n Still: \(unwrappedActivity.stationary)")
        }
    }
    

    // MARK: Raw Motion Functions
    func startMotionUpdates(){
        // some internal inconsistency here: we need to ask the device manager for device
        if self.motion.isDeviceMotionAvailable{
            self.motion.startDeviceMotionUpdates(to: motionQueue, withHandler: self.handleMotion)
        }
    }
    
