refactor poll_controller