setup throttle function