fix bug where map() was not turned into a list for python 3