rename test_script to run and modifications for data generation