use better rate limiting logic