use list comprehension instead of list.append