micro-optimization nit: replace list comprehension with generator expression