retry logic for rate limiting