more jni implementation wip