updated speed variable