updated JNI interface