     var startLoc: CLLocationCoordinate2D!
     var endLoc: CLLocationCoordinate2D!
     var currentLoc: CLLocationCoordinate2D!
+
     override func viewDidLoad() {
         super.viewDidLoad()
         // Do any additional setup after loading the view.


    // save the video to core data
    func saveVideoToCoreData() {
        let path = Bundle.main.path(forResource: "IMG_1800", ofType: "MOV")
        let asset = AVURLAsset(url: URL(fileURLWithPath: path!))

        let currentVideo = Video(started: Date(), asset: asset, startLoc: startLoc, endLoc: endLoc)

        let managedContext =
            appDelegate!.persistentContainer.viewContext


    // stop and start recording based off recording state
    @IBAction func recordVideoButtonPressed(sender _: AnyObject) {
        // end recording
        if movieFileOutput.isRecording || simulatorRecording {
            // stop recording
            movieFileOutput.stopRecording() // calls fileOutput() method below

            // stop recording the simulator
            if TARGET_OS_SIMULATOR != 0 {
                // force seque to previousTrips
                performSegue(withIdentifier: "previousTrips", sender: nil)
                updateRecordButtonTitle()
            }
        } else { // start recording
            startLoc = currentLoc
            // not running simulator
            if TARGET_OS_SIMULATOR == 0 {
