additional assertion and move method into package.scala