     digitalWrite(gear_lodged[i], LOW);
   }
 
+  // reset internal state: you have to start over.
+  for(int i=0; i<7; i++)
+  {
+    correct_positions[i] = 0;
+  }
+
   // TODO(bhomberg): close all solenoids (??)
 }
 

// hard-coded pins
int gear_connections[3][12] = {{ 2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13}, 
                               {14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}, 
                               {26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37}};

// gears have been taken out / selector gear goes back to beginning, reset everything
void reset()
{
  // turn off all lights
  for(int i=0; i<7; i++)
  {
