update to java code