minor changes to the setInterval