Create and finalize iterator api