terrible attempts at serialization