put polling on a loop