added debounce option for resize event