finished segment overlap algorith