update main.java and add libraries