update to class for newest .java
added more code.