better, but not perfect, referral flow handling