updated link routine