       break;
     case 1:
       //firing HLT and RIMS
+      RIMSonDuration = RIMSwindow * setRIMSpct;
+      RIMSoffDuration = RIMSwindow - RIMSonDuration;   
+
       if ((!paused) && (currRIMS < setRIMS) && (currRIMS != 0))
       {
         //ensure HLT off

    case 2:
      //firing BK only
      float setBKpct = setBK / 100.0;
      float onDuration = (float)window * setBKpct;
      float offDuration = (float)window - onDuration;   
      
      if (!paused)
      {
        //if (BKon)
        if (digitalRead(BKSSR))
        {
          if ((currentMillis - previousMillis > (long)onDuration) && (setBK < 100))
          {
            previousMillis = currentMillis;
            elementOff(2);
          }
        }
        else
        {
          if (currentMillis - previousMillis > (long)offDuration)
          {
            previousMillis = currentMillis;
            elementOn(2);
          }
        }

          elementOff(0);
        }
        //now turn on RIMS
        if ((digitalRead(RIMSSSR) == LOW) && (currentMillis - previousMillis > RIMSoffDuration))
        {
          elementOn(1);
        }
	else
	{
          if ((currentMillis - previousMillis > RIMSonDuration) && (currRIMS > (setRIMS - 5)))
          {
            elementOff(1);

            //fire HLT?
            if ((!paused) && (currHLT < setHLT))
            {
              if (digitalRead(HLTSSR) == LOW)
              {
                elementOn(0);
              }
            }
          }
        }
      }
      else
