code modified to run all rows in CSV