replace map with list comprehension