Separated iterator code from _get function