public void count(String msg)
   {
      LCD.clear();
      System.out.println(msg);
      boolean counting = true;
      while (counting)  // sometime, make this false to exit the loop
      {
    	 // print();
         int buttonID = Button.waitForAnyPress();
         if (buttonID > 0)
         {
        	 if(buttonID == 2){//when Left button is pressed
        		point.x++;
        		print(); 
        		
        	 }
        	 if(buttonID == 3){//when Left and Enter button is pressed
         		point.x--;
         		print(); 
         		
         	 }
        	 if(buttonID == 4){//when Right button is pressed
         		point.y++;
         		print(); 
         		
         	 }
        	 if(buttonID == 5){//when Right and Enter button is pressed
          		point.y--;
          		print(); 
          		
          	 }
        	 if(buttonID==8){//When enter is pressed
        		 LCD.drawString("Exit now?", 0, 5);
        		 int buttonID2 = Button.waitForAnyPress();
        		 if (buttonID2 == 2){
        			 counting = false;
        		 }
        		 if(buttonID2==4){
        			 counting = true;
        		 }
        	 }
            if (buttonID == 8)
            {	
               LCD.clear();
               
            } else
            {
               Sound.beep();
            }
         }


      }
   }