some experimentation with jni