implement the quaternion utility.