added referral model and controller