make the iterator's next() method return the iterator instead of undefined