referral resource class partially refactored