updateAll method updated