added retry and test script