start working on using critical JNI