added scala implelentation