add link() and a test for it