New version that detects end of lines