Scala utilities