updated the link funtions