use list comprehension to improve the running speed