latest attempt at #124. using new local union to avoid need for raw bytes.