fixing referrals and materials