Add default values in determine speed function