Refactored retries
Set retry time instead of number of tries.