updated referral commission code