adding iterator support to memory, file persistence