test script restructured