added prevention to adding duplicate links