referral link function