code refactoring for jnodeInserted