added retries upto 3 times