tuned debounce code