refactoring csv importer into csv file