iteration source/sink refactor