Merge multi thread to single thread

Merge multi thread to single thread