be more compact by using comprehensions