Add a helper function for iteration.