end points to the next character after newline