modify for java