added the ability to control the interval and the number of polls done each interval