added clever line connection
(2-nd point will be checked)