TODO for java version