parallelize contiguous regions script