give an example of how to support normal class instead of case class