   last_time = millis();
 
   button.pressHandler(onPress);
+  button.releaseHandler(onRelease);
   button.holdHandler(onHold, 1000); // must be held for at least 1000 ms to trigger
 }
 

  if(Serial.available() > 0) {
    serialLoop();
  }
  
  color_loop();
  button.process();
}


  j = j + random(1,2);
  f = f + random(1,2);
  k = k + random(1,2);
}

void countdown_loop() {
  long elapsed = millis() - countdown_start;
  if(elapsed > countdown_length) {
    Serial.println("SEIZURE MODE ACTIVATE");
    draw_mode = SEIZURE_MODE;
    last_time = millis();
  } else {
    draw_progress(elapsed, countdown_length);
  }
}

void cooldown_loop() {
  long elapsed = millis() - cooldown_start;
  if(elapsed > cooldown_length) {
    draw_mode = COLOR_MODE;
    last_time = millis();
  } else {
    draw_progress(cooldown_length - elapsed, countdown_length);
  }
}

void draw_progress(long elapsed, long countdown_length) {
  Serial.print("Elapsed: "); Serial.println(elapsed);
  float progress = (float) elapsed / (float) countdown_length;
  int count = round((float)LED_COUNT * progress);
  for (int x = 0; x < count; x++) {
    strip.setPixelColor(x, strip.Color(255,255,255));
  }
  for(int x = count+1; x < LED_COUNT; x++) {
    strip.setPixelColor(x, strip.Color(255,0,0));
  }
  strip.show();
}

void seizure_loop() {
  long elapsed = millis() - last_time;
  uint32_t new_color;
  Serial.print("Seizure time Elapsed: ");
  Serial.println(elapsed);
  if(elapsed > 30) {
    all_on = ~all_on;
    last_time = millis();
  }
  if(all_on)
    new_color = strip.Color(255,255,255);
  else
    new_color = strip.Color(0,0,0);
  for(int x = LED_COUNT; x >= 0; x--) {
    strip.setPixelColor(x, new_color);
  }
  strip.show();
}

void serialLoop() {
