add path_ref
refactor iterate/stoppable_sink