                         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");
-        }
+                }else{
+                        Serial.println("Serial B: \t\t N/A");
+                }
+        }
+
+        if (buttonState[0] == LOW) {
+                if (not (digitalRead(motorAR_hot) == HIGH or currentState[1] == LOW) or buttonState[1] == HIGH) {
+                        motorOn("A", "F");
+                }
+        }
+
+        if (buttonState[1] == LOW) {
+                if (not (digitalRead(motorAF_hot) == HIGH or currentState[0] == LOW) or buttonState[0] == HIGH ) {
+                        motorOn("A", "R");
+                }
+
+        }
+        if (buttonState[0] == HIGH and buttonState[1] == HIGH) {
+                motorOff("A");
+        }
+        if (buttonState[2] == LOW) {
+                if (not (digitalRead(motorBR_hot) == HIGH or currentState[3] == LOW) or buttonState[3] == HIGH) {
+                        motorOn("B", "F");
+                }
+        }
+
+        if (buttonState[3] == LOW) {
+                if (not (digitalRead(motorBF_hot) == HIGH or currentState[2] == LOW) or buttonState[2] == HIGH ) {
+                        motorOn("B", "R");
+                }
+
+        }
+        if (buttonState[2] == HIGH and buttonState[3] == HIGH) {
+                motorOff("B");
+        }
+
 
         if (digitalRead(motorAF_hot) == HIGH) {
                 Serial.println("A: \t\t FWD");

#include <Arduino.h>
// #include <stdio.h>

const int motorAF_neutral = 9;     // motor circuit is connected to pin 5
const int motorAF_hot = 8;
const int motorAR_neutral = 12; // motor circuit is connected to pin 5
const int motorAR_hot = 11;

        pinMode(buttonBR, INPUT_PULLUP); // input, shorting to ground pulls input
        // low, so "LOW" state is on
        Serial.begin(9600); // sets the data rate for the serial monitor tool
        motorOff("A");
        motorOff("B");
}

bool *
