minor optimization, adding tests for comparison of links