Added multiprocessing functions