agree with Nicolas this is much nicer with the case class