modified comments
consolidate for loops into comprehensions