   }
 }
 
-void sleep(unsigned long minTime, unsigned long maxTime){
-  unsigned int delayVal = random(minTime, maxTime);
+void sleep(unsigned long minSec, unsigned long maxSec){
+  unsigned int delayVal = random(minSec, maxSec);
   laser.fire(0);
   panTilt.detach();
   unsigned long startTime = millis();
   for(unsigned long i = 0; i < delayVal; i++){
     while(millis() - startTime < 1000){
-      heartBeat(millis());
-      delay(10000);
+      heartBeat(millis(), 10000);
       if(startTime > millis()){ //check for rollovers
         startTime = millis();
+        break;
       }
     }
     startTime = millis();

    oldTime = mSeconds;
  }
}

void get


int getMarkovSpeed(int oldSpeed){
  int val = random(101);
  int lowVal, midVal, hiVal;

  if(oldSpeed == 1){
    if(val < 20){
