decomposition of the handleElemMod()