removing unneeded links