speed_check routine added.