isolate the update logic in g.updateAllItems