adjust for Scala: simplify behavior