updated toCsv