use list comprehension instead of filter()