- refactored test script