first try to mimic case class behavior