Added multiprocessing support