upgraded to a case class