add multiprocessing for parallel in and out collection