changes for java8/java7 compilation