updated rate limit handling