Added setTimeout to deal with rate limit exceeding