now with working native serialization