rework setReferral method