readding the java thread check