Changed speed type to float