move iterator_sink to a new header