implement iterable correctly