Stop rotation in position

I have a joint motor going.This is the script im using to activate the joint motor to rotate my object

function Update() {
   if (Input.GetKey("o")) {
      hingeJoint.useMotor = true;
   } else {
      hingeJoint.useMotor = false;
   }
}

What i want to do is when i release “o” it stops the joint motor(witch i already have in my script)but instead of the object just rotating back around i want it to stop in the position i release the key stroke at.

Im creating a piece of machinery and machine when they say lift something with their arm the arm stops in the position they released the joy stick at.

Thanks

Edit!!:::Never mind i solved my own problem on the object rotating back down!Seems im smarter than i thought.