added scala support