testany instead of for loop in polling functions