removing redundant links