adds debounce funcitonality