make csv exporter more generic