Remove the second pmap call and change functions for consistency