       {
         if(Step_Sending(false, false, true))
         {
-          currentStep = ShowResult;
-          winningHat = random(0,3);
+          timesToSendBlue--; 
+          if(timesToSendBlue<0)
+            currentStep = ShowResult;
         }
         lastTime = newTime;
       }
       break;
     case ShowResult:
-      Serial.println("Finished");
-      lastTime = newTime;
-      currentStep = Start;
+      Serial.print("ShowResult...elapsed: ");
+      Serial.println(elapsedTime);
+      if(elapsedTime > 1000)
+      {
+        if(winningHat>=0)
+        {
+           Step_Sending(true, true, true))
+           winningHat--;
+        }
+        else
+        {
+           currentStep = Finished;
+        }
+        lastTime = newTime;
+      }
+      break;
+    case Finished:
+      Serial.print("Finished....elapsed: ");
+      Serial.println(elapsedTime);
+      if(elapsedTime > 10000)
+      {
+        lastTime = newTime;
+        currentStep = Start;
+      }
       break;
   }
 }

      {
        if(Step_Sending(true, false, false))
        {
          currentStep = SendingGreen;
        }
        lastTime = newTime;
      }

  switch(currentStep)
  {
    case Start:
      currentStep = WaitingForButton;
      lastTime = newTime;
      break;
