Use list comprehension instead of  map() for Python 3 compatibility