add __iter__ method