some retry logic to attempt to handle issues with api instability