now using speed to switch gears