rework link_algorithm for #59
Merge branch 'master' of https://github.com/CognitionGuidedSurgery/msml