write to the writer