separate logic from view in applicant detail page