improve test script