write all links into a set