use recursive iterator