Scala practice