changed connect line method