save interval is no logner a global variable