added fixed withRetry