simplify formatting, and make newline processing explicit