Scala train example