use start and end points. some lines are disconnected