local function drawSpeed()
    setInterval(function ()
        currentSpeed = string.format("%3d", math.floor(car.speedKmh))
    end, 0.3, "key")

    clearInterval("key")

    display.text(
	{text = currentSpeed, 
	pos = vec2(570, 88),
	letter = vec2(50, 110),
	font = 'digital_big',
	color = rgbm(255/255, 0/255, 0/255, 1),
	alignment = 1,
	width = 300,
	spacing = 10 })
end

function script.update(dt)
    drawSpeed()
end