use list comprehension instead of for-loop to keep consistent with the previous topic