negative testcases and retry logic added