some preparation for csv exporting