make csv export smarter