finally make JNI layer function well!