Updating Scala's code