pull out links and create a link-map