changes in the java example