       serprintf("player %d update_display...\r\n", i);
       players[i]->update_display();
     }
-    active_player = NONE;
-    clock_being_set = 0;
     serprintf("Controller reset complete.\r\n");
   }
 
   void handle_mode_button() {
 
     ButtonState *state = mode_button->poll();
-
+    
+    unsigned long press_duration_ms = state->press_duration_ms; 
+    bool button_pressed = state->pressed;
+    bool just_released = state->just_released;
+
+    
+    switch (game_state) {
+      case PRE_GAME:
+        if (button_pressed) {
+          if (press_duration_ms > mode_button_settime_ms) {
+            set_time();
+          } 
+        }
+        break;
+      case IN_PROGRESS:
+        if (button_pressed) {
+          if (press_duration_ms > mode_button_reset_ms) {
+            reset();
+          } else if (press_duration_ms > 0) {
+            pause();
+          }
+        }
+        break;
+      case SET_TIME:
+        if (just_released) {
+          game_state = SET_TIME_CLOCK_1;
+        }
+        break;
+      case SET_TIME_CLOCK_1:
+      case SET_TIME_CLOCK_2:
+        if (press_duration_ms > 0) {
+          set_time_next_step();
+        }
+        break;
+    }
+/*
     //unsigned long mode_button_held = mode_button->poll();
     unsigned long mode_button_held = state->press_duration_ms; 
     bool button_pressed = state->pressed;

    if (game_state == PRE_GAME) return;
    serprintf("Controller reset...\r\n");
    game_state = PRE_GAME;

    for(unsigned int i = 0; i < NUM_PLAYERS; i++) {
      serprintf("player %d clock...\r\n", i);


    switch (game_state) {
      case INIT:
        return;
        break;
      case PRE_GAME:
        handle_pre_game_player_buttons();
        break;
      case IN_PROGRESS:
        handle_in_progress_player_buttons();
        if (players[active_player]->out_of_time()) {
          players[active_player]->flag();
          break;
        } 
        players[active_player]->tick();
        break;
      case SET_TIME:
      case SET_TIME_CLOCK_1:
      case SET_TIME_CLOCK_2:
        handle_set_time_player_buttons();
        break;
      case PAUSED:
        handle_paused_player_buttons();
        break;
      default:
        serprintf("Should not get here; default case of controller tick switch!\r\n");
        break;
    }
    handle_mode_button();
/*
    if (interrupt_fired != NONE) {
      // Someone pressed a button since the last time we checked.
