added undoRemove functionality