ENH: use iteration