Code change to run it on multi thread.