New version with list comprehensions