return links if "while links" loop ends