figuring out links, refs, etc