added path connecting code for initially disconnected lines list