Added data crunching code for csv files