Updating first then using setInterval