initial quaternion implementation