add window module, add multi thread