refactoring exportCsv module