improve lua test script