edge based merging starting to work, next need to remove nodes with conectivity of 2