corrected speed array assignment error