almost done with csv exporting