added ability to export to CSV