   Serial.print("\t");
 }
 
-void rndDelay()
+void rndDelay(int loBound, int hiBound)
 {
-  int ms = random(4000, 7000);
+  int ms = random(loBound, hiBound);
 
   Serial.print("delay:");
   Serial.print(ms);

      // right side movement
      angle = random(angle, angle + variation);
    }
    else {
      break;
    }

    myservo.write(angle);

    Serial.print("\t");
    rndDelay(4000, 6000);

    Serial.print("\t");
    int rightValue = readDetector(DETECTOR_RIGHT, "right");
