last case study related code