added code to extract a link