   //see if the time is being set. 
   if(digitalRead(5) == LOW){
     reset_slow = true;
-    time_set = true;
     reset_init();    
   }  else {
     if(digitalRead(4) == LOW){
       reset_fast = true;
-      time_set = true;
       reset_init();    
     }  
   }


//call this function if a time set button is pressed.
void reset_init(){
  reset_mills = mil;

  //use current time setting as new initial values.
  hr_init = 0;
  min_init = 2;
  if(p1 == 1) hr_init = 4;
  if(p2 == 1) hr_init += 2;
  if(p3 == 1) hr_init += 1;
  if(p4 == 1) min_init += 30;
  if(p5 == 1) min_init += 15;
  if(p6 == 1) min_init += 8;
  if(p7 == 1) min_init += 4;
  if(p8 == 1) min_init += 2;
  
  if(p6 == 1 && p7 == 1 && p8 == 1)
    min_init -= 1;
}

void setup(){

  }else{

    //subtract lapsed time since last occasion that the time was set.    
    mil -= reset_mil;
  
    // TUNE your arduino
    sec = (mil/1000 * fudge_factor) + offset;
