update line ends