Implemented export to CSV