updated to have 3 retries per request