changing setInterval to 1s instead of 1ms; log timeDiff