better newline removal