better newline support and testing