updated Main.java to use new array list