it would probably make more sense to add an `updateItem` function here, too, rather than treating an update as a delete followed by an add. That way we don't have to check against "is this item added and removed at the same time" to infer it's merely been changed.