Modify it as multi-thread program