Changing to scala's built-in do