support new iterator api