Add keeping the nearest line