restored the interval javascript