wrapped polling in routine.