simple function of exporting csv