updated 'map(...)' to 'list(map(...))' for python3 compatibility