Cut down on one for loop in poll_input