simplify s2s marshall/demarshall a bit