add case class code