suggestion from kmike to use a generator expression to avoid building the list in memory