modified custom case class