Changed setTimeout to setInterval