Changed exercise to use list comprehension