implements iterable like the standard does