further refine test script