Changed list comprehension to generator comprehension.