use pmap instead of map for time-consuming computation