decorated marshall/demarshall calculations with a datatype and named fields (no changes to algorithm)