use case class instead of enum