Update Main.java

Updated to the latest version of code