further scala conversion