refactor to iterables