new Quaternion code