add methods to deal with pmap