scala divide method