 boolean stressedServo = false;       // flag for above
 unsigned long timeStart = 0;
 unsigned long timeCurrent = 0;
-boolean UPDATE = true;              // flag for printing updated info to serial monitor
+boolean UPDATE = true;                  // flag for printing updated info to serial monitor
+unsigned long currentTime = millis();  // I can't seem to declare local variables
+byte currentServoPos = 0;              
 
 AccelStepper stepperArm(AccelStepper::DRIVER, PINST1_ST, PINST1_DIR);
 AccelStepper stepperLift(AccelStepper::DRIVER, PINST2_ST, PINST2_DIR);
 
 const long int liftUpToTop = -200000;     // arbitrary rise until limit switch hit.
-const int liftBackOff = 500;              // back off the switch; zero is limit-switch position
+long int liftBackOff = 500;              // back off the switch; zero is limit-switch position
 
 Servo myserv;
 

      UPDATE = true;
      oldAnalog1 = newAnalog1;
    }
    else if (abs(oldAnalog2 - newAnalog2) > 30)
    
    if (UPDATE) {
        Serial.print("Liftpos: " + String(stepperLift.currentPosition()) + " Armpos: " + String(stepperArm.currentPosition()));
        Serial.println("  A0: " + String(newAnalog1) + "  A1: " + String(newAnalog2) + " srvo: " + String(myserv.read()));
        UPDATE = false;
    }
    
    stepperLift.run();
    stepperArm.run(); {
      UPDATE = true;
      oldAnalog2 = newAnalog2;
    }
    else if (abs(myserv.read() - oldServoPos) > 2) {
      UPDATE = true;
      oldServoPos = myserv.read();
    }
    
    if (UPDATE) {
        Serial.print("Liftpos: " + String(stepperLift.currentPosition()) + " Armpos: " + String(stepperArm.currentPosition()));
        Serial.println("  A0: " + String(newAnalog1) + "  A1: " + String(newAnalog2) + " srvo: " + String(myserv.read()));
        UPDATE = false;
    }
    
    stepperLift.run();
    stepperArm.run();
     
    // first character sent switches us into LOADED mode
    // 97="a", 98="b", 99="c", 100="d"                                

      }
      else if (inputString == "99") {        // 'c' unidentified pile
        stepperArm.moveTo(secondArmPos);
        destinationArmPos = secondArmPos;
      }
      else if (inputString == "100") {       // 'd' Reset into loading mode until another character sent
        stepperArm.moveTo(firstArmPos);
