switched old getlink function for jq solution