adding retries and delay