added throttle function to util