source code updated to Java 7