implementation using pmap