   if (button == BUTTON_RESTART) {
     return start_countdown_timer();
   } else if ( button == BUTTON_MODE ) {
-    return change_to_mode_state();
+    return change_to_state(STATE_MODE);
   } else if ( button == BUTTON_PLUS ) {
     countdown_duration += ONE_MINUTE;
   } else if ( button == BUTTON_MINUS && countdown_duration >= ONE_MINUTE ) {


void start_countdown_timer () {
  countdown_ends = millis() + countdown_duration + 300;
  current_state = STATE_RUNNING;
}

void running_state_loop (int button) {

  if ( button == BUTTON_RESTART ) {
    start_countdown_timer();
  } else if ( button == BUTTON_MODE ) {
    change_to_state(STATE_WAITING);
  } else if ( button == BUTTON_PLUS ) {
    countdown_ends += ONE_MINUTE;
    change_to_state(STATE_RUNNING);
  } else if ( button == BUTTON_MINUS ) {
    long time_remaining = countdown_ends - millis();
    if ( time_remaining > ONE_MINUTE ) {
      countdown_ends -= ONE_MINUTE;
      change_to_state(STATE_RUNNING);
    }
  }
}
