Use map instead of pmap to reduce compilation time (bg agents)