simplfy code
follow scalacheck