case study code