implemented multiprocessing for pairing process