improved term distances by multiprocessing