improve multiprocess function
improve multiprocess function