Some embodiments of the invention relate to a mechanism for actuating a shaft having two degrees of freedom, comprising: a first actuator configured to rotate the shaft around the shaft axis, and a second actuator configured to bend the shaft using one or more elongated elements attached to the shaft, wherein actuation of the first actuator indirectly manipulates the elongated elements controlled by the second actuator, thereby affecting operation of the second actuator. Some embodiments relate to motorized actuation of a system comprising at least one surgical arm.