Conversion of java to scala, first steps to mr