Function out of iterator, add sample data for tests.