remove reduntant links