corrected end lines