adding an option for retries as well