improved buffer. combineLines still pending