iterator functions need to use pointer-to-pointers in order to know the true current location