    digitalWrite(latchPin, LOW);
    shiftOut(dataPin, clockPin, LSBFIRST, leds);
    digitalWrite(latchPin, HIGH);
+}
+
+//global variables for the test function
+const long testInterval = 500; //counter delay in milliseconds
+long previousTestTime = 0; //previous count time
+int testLoop = 0; //counter for counting loop
+
+void testCaseAllNum() {
+  //test case, a loop timer that runs through each integer from 0 to 9999
+  unsigned long currentTestTime = millis();  //get current milliseconds for counting counter
+
+  if (currentTestTime - previousTestTime > testInterval) {
+    previousTestTime = currentTestTime;
+
+    splitNumber(testLoop);
+
+    testLoop ++;
+
+    //reset loop to 0 at end of displayable integers
+    if (testLoop == 10000)
+      testLoop = 0;
+  }
 }
  
  //clear previous values of the num array, -1 value allows checking to see if a new value has been placed
  for (int i=0; i<4; i++)
    num[i]=-1;

  //if n is 0-9
  if (n < 10) {

    refreshLoop++;
  }

  testCaseAllNum();
}

void clearLEDs() {
