updated csv exporter with a few changes