add time debounce function, had test