fixed: local variable 'referral_list' referenced before assignment