Moved for loop into list comp