merge the lines