add initial speed control code