example of writing to csv