add __next__ method for py3 iteration