Moved the interval into a function to enable toggling it;