add multi-process support