seriously simplify the buffer writer by not accepting a ref to a buffer