Added support for retries