add multiprocessing support