still working on the functional iterator