Source code for CaseStudy