modified main.java file