some optimizations to modifyAndNotify