added support for iteration