refactor poll_job