add multithreading to demo pipeline script