updated project2.java