Change to setTimeout instead of setInterval