adding throttle and debounce