added Scala support