add stream-to-csv stuff