remove tailing newline