added jni code