first draft of full add-links functionality