modified (not tested) performance test script