Building the throttle function