update according to scala