groupby equals fix, now merge edges