reimplements multiprocessing