initial version of jni works