added ability to write with iterator in CSVWriter.class