removing end lines