recursive iterator