Added debounce method to html