     var goalFailed = false
     var backgroundTask: UIBackgroundTaskIdentifier = UIBackgroundTaskInvalid
     var timeBeforePause: NSDate?
+    var userTargetTime = 0
     
     override func viewDidLoad() {
         super.viewDidLoad()

    }
    
    func saveCurrentTime() {
        timeBeforePause = NSDate()
        NSLog("Time before paused: \(timeBeforePause)")
        stopTimer()

        let currentTime = NSDate()
        NSLog("Time at resume: \(currentTime)")
        let interval = currentTime.timeIntervalSince(timeBeforePause! as Date) as Double
        let intervalInMin = interval / 60
        
        guard intervalInMin < Double(userTargetTime) else {
            NSLog("You succeeded!!!")
            resetTimer()
            return
        }

        circularSlider.endPointValue = circularSlider.endPointValue - CGFloat(intervalInMin)
        operateTimer()
    }
    
    func resetTimer() {
        circularSlider.endPointValue = 0
        timerLabel.text = "0h 0m 0s"
    }

}
