improvement of the jni bridge