added ability to export to csv