changes based on jni feedback