Added support for links in both directions