started refactoring outputToCsv to output directly to google doc