update quaternion