 
 boolean correct_press()
 {
-  /*lcd.setCursor(0,0);
-  lcd.print(user0);
-  lcd.setCursor(0,1);
-  lcd.print(user1);
-  delay(700);
-   if(user0==val0 && user1==val1)
-   {
-     tone(buzz_pin, 1500, 400);
-     lcd.setCursor(0,0);
-     lcd.print("CORRECT");
-     delay(900);
-   }
-   else{
-     //tone(buzz_pin, 2000, 300);
-     //tone(buzz_pin, 400, 400);
-     lcd.setCursor(0,0);
-     lcd.print("~~~~~~");
-     lcd.setCursor(0,1);
-     lcd.print("~~~~~~"); 
-     delay(900);
-   }*/
-   delay(80);
+//   delay(80);
    return (user0==val0 && user1==val1);
 }
 
 void loop() 
 {
+  if(start_delay)
+  {
+    delay(400);
+    tone(buzz_pin, 1900, 200); 
+    delay(400);
+    tone(buzz_pin, 1900, 200);
+    delay(400);
+    tone(buzz_pin, 1900, 200);
+    delay(400);
+    tone(buzz_pin, 3000, 200);
+  }
+  ++loop_count;
   button_state = digitalRead(button_pin);
   touch_state = digitalRead(touch_pin);
-//  lcd.setCursor(0,0);
-//  lcd.print(touch_state);
-//  lcd.setCursor(0,1);
-//  lcd.print(button_state);
-//  delay(100);
-//  tone(buzz_pin, 900, 40);
   if(button_state == HIGH)
   {
     user1 = 1;
-    /*tone(buzz_pin, 900, 200);
-    lcd.setCursor(0,1);
-    lcd.print("HIHIHIHI");*/
   }
   else
     user1 = 0;
   if(touch_state == HIGH)
   {
     user0 = 1;
-    /*tone(buzz_pin, 1800, 40);
-    lcd.setCursor(0,0);
-    lcd.print("00000");*/
   }
   else
     user0 = 0;
+//  lcd.setCursor(0,0);
+//  lcd.print("user0:");
+//  lcd.print(user0);
+//  lcd.setCursor(0,1);
+//  lcd.print("user1:");
+//  lcd.print(user1);
+//  delay(100);
+  if(start_delay)
+  {
+    delay(300);
+    start_delay = false;
+  }
   if(correct_press())
   {
-    ++ptr0;
-    ++ptr1; 
+    //++ptr0;
+    //++ptr1; 
+    good = true;
   }
   if(ptr0<ptr_max)
   { 

  //setting val0 and val1
  val0 = map_0[ptr0];
  val1 = map_1[ptr1];
  /*lcd.setCursor(0,0);
  lcd.print("val0:");
  lcd.print(val0);
  lcd.setCursor(0,1);
  lcd.print("val1:");
  lcd.print(val1);
  delay(700);
  lcd.setCursor(0,0);
  lcd.print("usr0:");
  lcd.print(user0);
  lcd.setCursor(0,1);
  lcd.print("usr1:");
  lcd.print(user1);
  delay(700);*/
  //displaying map
  for(;i<16;++i)
  {

    lcd.print(blank_writer);
    delay(200);
    map_display();
    delay(30);
}

//map display function
