understand debounce to work