modify the java code