implemented speed control