Better use of the interval api.