Changed to use list comprehension