this is the java code