Update and rename main.java to function.java