Simplify by using generator expression