changed getLinks(url) to a variable