added more code

main.java