modified main script to generate the csv file with the tidy data set