pass in interval as argument