try to optimize pollAndRun