Changed linksDict to Set