removed unnecessary for loop in Main.class