arrange remove next to iterate, accumulate