Added torque and speed function