changed to list comprehension