modify addlinkref method