add multi thread feature