add multi-processing support, rather than polling in one single process