convert to scala app