configurable number of retries