added rmElem method