added debouncing and press-counts