deal with duplicate pairs in net file