compress for loop into list comprehension