 
 
   panTilt.updateAngles();
+  if(markovShakeState == 2){
+    shake();
+  }
+
 if(millis() - timePassed >= 1000){
     changeVal = getMarkovSpeed(changeVal);
-
-    if(markovState(20, 70) == 2){
-      shake();
-    }
+    markovShakeState = markovState(10, 20);
+
 
     if(random(101) < 6){
       delay(markovPause());

  }

  else if(oldSpeed == midVal){
    if(probability < 20){
      return hiVal;
    }
    else if(probability < 70){
      return midVal;
    }
    else{

    }


    if(random(5001) < 1){
      sleep(5, 10);

    }

    else if(random(10001) < 10){
      sleep(1800, 2400); //sleep between 30 and 40 minutes
    }
    timePassed = millis();
