added saveCSV and readCSV function