modify the way to erase iterator in purge story