added interval option to control polling intervals.