added gimbal lock support