Convert to Scala