added pmap function to asbtract away multiprocessing.
update pivot_elements, and extra args for randomfacet functions.