serializing algebraic data with .mrdi files