finishing csv import and export functions