Adding method to do multiprocessing.