solved Statistics.java