     }
     func prepareMission(missionName: DJIWaypointMission){
         print("Mission prepared!")
-        //executeMission()
         // Upload the mission and then execute it
         // Setting up the mission manager
-        /*
-        mission = DJIWaypointMission
-        self.mission.(mission, withProgress: nil, withCompletion:
-            {[weak self] (error: NSError?) -> Void in
+        
+        //load mission
+        missionState = DJIWaypointMissionState.readyToUpload
+        missionManager?.load(missionName)
+        latestExecutionProgress = nil
+        
+        if (missionManager?.loadedMission?.isComplete)! && missionState == DJIWaypointMissionState.readyToUpload {
+            //mission upload to aircraft
+            missionManager?.uploadMission(completion: { (error) in
                 if error == nil {
-                    self?.missionManager!.startMissionExecutionWithCompletion({ [weak self] (error: NSError?) -> Void in
-                        if error != nil {
-                            print("Error starting mission" + "abcd")
-                            self!.logDebug("Error starting mission: " + (error?.description)!)
-                            
-                        }
-                    })
+                    //execute mission
+                    self.missionState = DJIWaypointMissionState.readyToExecute
+                    self.executeMission()
                 } else {
                     print("Error preparing mission")
-                    self!.logDebug("Error preparing mission: " + (error?.description)!)
-                }
-                
-        })
- */
+                    self.showAlertResult(info: "Error preparing mission: " + (error?.localizedDescription)!)
+                }
+            })
+        }
     }
     
     //************ Flight Controller Drone Method *****************//
-    //DJI took away turnOnMotors, they may open it for the next comming version
-    //so we can just call takeoff
-    /*
-     func startPropellers(_ fc: DJIFlightController!) {
-     print("fc = \(fc)")
-     if fc != nil {
-     fc!.turnOnMotors(completion: {[weak self](error: Error?) -> Void in
-     if error != nil {
-     self?.showAlertResult(info: "TurnOn Error: \(error!.localizedDescription)")
-     }
-     else {
-     self?.showAlertResult(info: "Turnon Succeeded.")
-     }
-     })
-     }
-     else {
-     self.showAlertResult(info: "Start Propellers Component not existed")
-     }
-     }
-     */
+
     func takeOff(_ fc: DJIFlightController!) {
         if fc != nil {
             

                var units: String
                
                var commandArr = comm.characters.split{$0 == " "}.map(String.init)
                
                direction = commandArr[1]
                
                if commandArr[2] == "by" {
                    if commandArr[3] == "to" { commandArr[3] = "2" }
                    if commandArr[3] == "to0" { commandArr[3] = "2" }
                    distanceText.text = "\(commandArr[3])"
                    dist = commandArr[3]
                    unitText.text = "\(commandArr[4])"
                    units = commandArr[4]
                }
                else if commandArr[2] == "for" {
                    if commandArr[3] == "to" { commandArr[3] = "2"}
                    if commandArr[3] == "too" { commandArr[3] = "2"}
                    distanceText.text = "\(commandArr[3])"
                    dist = commandArr[3]
                    unitText.text = "\(commandArr[4])"
                    units = commandArr[4]
                    
                } else {
                    if commandArr[3] == "to" { commandArr[3] = "2"}
                    if commandArr[3] == "too" { commandArr[3] = "2"}
                    distanceText.text = "\(commandArr[3])"
                    dist = commandArr[3]
                    unitText.text = "\(commandArr[4])"
                    units = commandArr[4]
                }
                let distance: Double = Double(dist)!
                //by here, we have each command being seperated into direction, distance, units
                // next steps are find location, distance and direction of drone

        
    }
    func checkProductConnected() {
        //Display conneciton status
        if ConnectedProductManager.sharedInstance.product != nil {
            connectionStatus.text = "Connected"
