programmatic rate detection