sample for Scala.