add multi-thread function and config file function