added run_test script, see comments for usage