exercise3:modified Main.ava