       beeping_state_loop(button);
       break;
 
-  }
-
-
+    case STATE_MODE:
+      mode_state_loop(button);
+      break;
+  }
 }
 
 

  } else if (new_state == STATE_BEEPING) {
    current_state = STATE_BEEPING;
  } else if (new_state == STATE_MODE) {
    Serial.println("FIXME - code up change_to_state(STATE_MODE)");
    change_to_state(STATE_WAITING);
  }
}



  // start in waiting state
  change_to_state(STATE_WAITING);
  change_to_state(STATE_MODE);
}

void loop() {
