DFRobot LCD shield

I had a big problem with switch bounce. There are 6 buttons one is just a hardwired reset. The others are scanned by analog channel 0. I modified the demo program like this:
Now it never gives me the wrong key push results.

int read_LCD_buttons() // read the buttons keyboard voltage test routine. Returns int ex: 'btnSELECT' is #defined as '4'
// button returned values centered at these values: 002, 130, 306, 478, 720 added approx 50 for buffer zone
{
adc_key_in = analogRead(0); // read the value from the sensor for keypad and then test the value for button levels.
delay(10); //switch debounce delay. Increase this delay if incorrect switch selections are returned.
if (adc_key_in != analogRead(0)) return btnNONE; // double checks the keypress. If the two readings are not equal after debounce delay, it tries again.
if (adc_key_in > 770) return btnNONE; // This is the 1st option for speed reasons since it will be the most likely result.
if (adc_key_in < 50) return btnRIGHT;
if (adc_key_in < 180) return btnUP;
if (adc_key_in < 355) return btnDOWN;
if (adc_key_in < 530) return btnLEFT;
if (adc_key_in < 770) return btnSELECT;
}