Switching to scala