added tests for link [first working version]