adjust for Scala