added logic for  link