debounce function added