use pmap properly