adding retryable helper that retries a closure a specified amount