Added a prior function to nbd_parallel