I tried the code, but it didn't work when i added the setInterval