some rudimentary attempts at serialization