Modified main.scala