modified the writer to to more like the sample data