         }
 
         // Serial monitor
-        if (Serial.available()) {
+        if (Serial.available())
+        {
                 String serialText =
                         Serial.readStringUntil('&'); // reads incoming data from the serial port
-                if (serialText == "onAF") // turn on A
-                {
-                        motorOn("A", "F");
+                if (serialText == "onAF") { // turn on A
+                        // motorOn("A", "F");
+                        buttonState[0] = LOW;
                         currentState[0] = LOW;
                         currentState[1] = HIGH;
                         Serial.println("Serial A: \t\t FWD");
-                } else if (serialText == "onAR") // turn on A
-                {
-                        motorOn("A", "R");
+                } else if (serialText == "onAR") { // turn on A
+
+                        // motorOn("A", "R");
+                        buttonState[1] = LOW;
                         currentState[1] = LOW;
                         currentState[0] = HIGH;
                         Serial.println("Serial A: \t\t REV");

                        currentState[2] = HIGH;
                        currentState[3] = HIGH;
                        Serial.println("Serial B: \t\t OFF");
                }
        }

        if (buttonState[0] == LOW and not (buttonState[1] == LOW)) // 4
        {
                // Serial.println("A: \t\t FWD");
                motorOn("A", "F");
        } else if (buttonState[1] == LOW and not (buttonState[0] == LOW)) // 4
        {
                // Serial.println("A: \t\t REV");
                motorOn("A", "R");
        } else if (buttonState[0] == LOW and buttonState[1] == LOW and currentState[0] == LOW and not (currentState[1] == LOW)) // 1
        {
                buttonState[1] = HIGH;
                // Serial.println("A: \t\t FWD");
                motorOn("A", "F");
        } else if (buttonState[0] == LOW and buttonState[1] == LOW and currentState[1] == LOW and not (currentState[0] == LOW)) // 1
        {
                buttonState[0] = HIGH;
                // Serial.println("A: \t\t REV");
                motorOn("A", "R");
        } else // 4+1
        {
                // Serial.println("A: \t\t OFF");
                // motorOff("A");
        }

        if (buttonState[2] == LOW and not (buttonState[3] == LOW)) // 4
        {
                // Serial.println("B: \t\t FWD");
                motorOn("B", "F");
        } else if (buttonState[3] == LOW and not (buttonState[2] == LOW)) // 4
        {
                // Serial.println("B: \t\t REV");
                motorOn("B", "R");
        } else if (buttonState[2] == LOW and buttonState[3] == LOW and currentState[2] == LOW and not (currentState[3] == LOW)) // 1
        {
                buttonState[3] = HIGH;
                // Serial.println("B: \t\t FWD");
                motorOn("B", "F");
        } else if (buttonState[2] == LOW and buttonState[3] == LOW and currentState[3] == LOW and not (currentState[2] == LOW)) // 1
        {
                buttonState[2] = HIGH;
                // Serial.println("B: \t\t REV");
                motorOn("B", "R");
        } else // 4+1
        {
                // Serial.println("B: \t\t OFF");
                // motorOff("B");
        }

        if (digitalRead(motorAF_hot) == HIGH) {
                Serial.println("A: \t\t FWD");

                        currentState[0] = HIGH;
                        currentState[1] = HIGH;
                        Serial.println("Serial A: \t\t OFF");
                } else{
                        Serial.println("Serial A: \t\t N/A");
                }

                if (serialText == "onBF") { // turn on B
                        // motorOn("B", "F");
                        buttonState[2] = LOW;
                        currentState[2] = LOW;
                        currentState[3] = HIGH;
                        Serial.println("Serial B: \t\t FWD");
                } else if (serialText == "onBR") { // turn on B

                        // motorOn("B", "R");
                        buttonState[3] = LOW;
                        currentState[2] = HIGH;
                        currentState[3] = LOW;
                        Serial.println("Serial B: \t\t REV");
