 int varDelayY;
 int moveX;
 int moveY;
+
+// interrupt variables
 int timerX;
 int timerY;
 boolean stateX;
 boolean stateY;
 int timerTick;
+
+// variables for reading in speed
+String str;
+int number;
  
 void setup() {
     pinMode(X_ENABLE_PIN, OUTPUT);

      Serial.println("r reset");
}

void loop() {  
//    if (moveX >= 0) {
//      stepX(stepsize, moveX);
//    }
//
//    if (moveY >= 0) {
//      stepY(stepsize, moveY);
//    }
  
    if (Serial.available()) {
        byte r = Serial.read();


                break;

            case 'u':
                noInterrupts();
                if (moveY == 0) moveY = -1; else moveY = 1;
                interrupts();
                break;
            case 'j':
                noInterrupts();
                if (moveY == 1) moveY = -1; else moveY = 0;
                interrupts();
                break;
            case 'k':
                noInterrupts();
                if (moveX == 0) moveX = -1; else moveX = 1;
                interrupts();
                break;
            case 'h':
                noInterrupts();
                if (moveX == 1) moveX = -1; else moveX = 0;
                interrupts();
                break;

            case 'm':
                readNumber();
                number = str.toInt();
                noInterrupts();
                varDelayX = number;
                if (varDelayX < MIN_DELAY) varDelayX = MIN_DELAY; 
                interrupts();
                Serial.print("speedX = ");
                Serial.println(varDelayX);
                break;

            case 'n':
                readNumber();
                number = str.toInt();
                noInterrupts();
                varDelayY = number;
                if (varDelayY < MIN_DELAY) varDelayY = MIN_DELAY; 
                interrupts();
                Serial.print("speedY = ");
                Serial.println(varDelayY);
                break;

            case 'r':
                noInterrupts();              
                reset();
                interrupts();
                break;

            default:
