taking care of all the missing end lines.