util: better serialization?