converting to Java