example of using the writer